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

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

Issue 2685483002: [debugger] expose side-effect free evaluate to inspector. (Closed)
Patch Set: add inspector test 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
« no previous file with comments | « src/flag-definitions.h ('k') | src/inspector/debugger_script_externs.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 { 413 {
414 var mirror = ensureFuncMirror(); 414 var mirror = ensureFuncMirror();
415 var context = mirror.context(); 415 var context = mirror.context();
416 if (context && context.data()) 416 if (context && context.data())
417 return Number(context.data()); 417 return Number(context.data());
418 return 0; 418 return 0;
419 } 419 }
420 420
421 /** 421 /**
422 * @param {string} expression 422 * @param {string} expression
423 * @param {boolean} throwOnSideEffect
423 * @return {*} 424 * @return {*}
424 */ 425 */
425 function evaluate(expression) 426 function evaluate(expression, throwOnSideEffect)
426 { 427 {
427 return frameMirror.evaluate(expression).value(); 428 return frameMirror.evaluate(expression, throwOnSideEffect).value();
428 } 429 }
429 430
430 /** @return {undefined} */ 431 /** @return {undefined} */
431 function restart() 432 function restart()
432 { 433 {
433 return frameMirror.restart(); 434 return frameMirror.restart();
434 } 435 }
435 436
436 /** 437 /**
437 * @param {number} scopeNumber 438 * @param {number} scopeNumber
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 case ScopeType.Global: 498 case ScopeType.Global:
498 case ScopeType.With: 499 case ScopeType.With:
499 result = scopeObject; 500 result = scopeObject;
500 break; 501 break;
501 } 502 }
502 return result; 503 return result;
503 } 504 }
504 505
505 return DebuggerScript; 506 return DebuggerScript;
506 })(); 507 })();
OLDNEW
« no previous file with comments | « src/flag-definitions.h ('k') | src/inspector/debugger_script_externs.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698