Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Side by Side Diff: src/inspector/debugger-script.js

Issue 2685483002: [debugger] expose side-effect free evaluate to inspector. (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 { 456 {
457 var mirror = ensureFuncMirror(); 457 var mirror = ensureFuncMirror();
458 var context = mirror.context(); 458 var context = mirror.context();
459 if (context && context.data()) 459 if (context && context.data())
460 return Number(context.data()); 460 return Number(context.data());
461 return 0; 461 return 0;
462 } 462 }
463 463
464 /** 464 /**
465 * @param {string} expression 465 * @param {string} expression
466 * @param {boolean} allowSideEffect
466 * @return {*} 467 * @return {*}
467 */ 468 */
468 function evaluate(expression) 469 function evaluate(expression, allowSideEffect)
469 { 470 {
470 return frameMirror.evaluate(expression).value(); 471 return frameMirror.evaluate(expression, allowSideEffect).value();
471 } 472 }
472 473
473 /** @return {undefined} */ 474 /** @return {undefined} */
474 function restart() 475 function restart()
475 { 476 {
476 return frameMirror.restart(); 477 return frameMirror.restart();
477 } 478 }
478 479
479 /** 480 /**
480 * @param {number} scopeNumber 481 * @param {number} scopeNumber
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
540 case ScopeType.Global: 541 case ScopeType.Global:
541 case ScopeType.With: 542 case ScopeType.With:
542 result = scopeObject; 543 result = scopeObject;
543 break; 544 break;
544 } 545 }
545 return result; 546 return result;
546 } 547 }
547 548
548 return DebuggerScript; 549 return DebuggerScript;
549 })(); 550 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698