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

Side by Side Diff: Source/bindings/core/v8/DebuggerScript.js

Issue 644403003: DevTools: Fix __commandLineAPI is not defined error and remove the with- hack for eval on call fram… (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 1 month 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 | Annotate | Revision Log
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 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 var func = ensureFuncMirror(); 438 var func = ensureFuncMirror();
439 if (!func.resolved()) 439 if (!func.resolved())
440 return undefined; 440 return undefined;
441 var displayName; 441 var displayName;
442 var valueMirror = func.property("displayName").value(); 442 var valueMirror = func.property("displayName").value();
443 if (valueMirror && valueMirror.isString()) 443 if (valueMirror && valueMirror.isString())
444 displayName = valueMirror.value(); 444 displayName = valueMirror.value();
445 return displayName || func.name() || func.inferredName(); 445 return displayName || func.name() || func.inferredName();
446 } 446 }
447 447
448 function evaluate(expression) 448 function evaluate(expression, scopeExtension)
449 { 449 {
450 return frameMirror.evaluate(expression, false).value(); 450 return frameMirror.evaluate(expression, false, scopeExtension).value();
451 } 451 }
452 452
453 function restart() 453 function restart()
454 { 454 {
455 return Debug.LiveEdit.RestartFrame(frameMirror); 455 return Debug.LiveEdit.RestartFrame(frameMirror);
456 } 456 }
457 457
458 function setVariableValue(scopeNumber, variableName, newValue) 458 function setVariableValue(scopeNumber, variableName, newValue)
459 { 459 {
460 return DebuggerScript._setScopeVariableValue(frameMirror, scopeNumber, v ariableName, newValue); 460 return DebuggerScript._setScopeVariableValue(frameMirror, scopeNumber, v ariableName, newValue);
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
539 "parentPromise": eventData.parentPromise().value(), 539 "parentPromise": eventData.parentPromise().value(),
540 "status": eventData.status() 540 "status": eventData.status()
541 }; 541 };
542 } 542 }
543 543
544 // We never resolve Mirror by its handle so to avoid memory leaks caused by Mirr ors in the cache we disable it. 544 // We never resolve Mirror by its handle so to avoid memory leaks caused by Mirr ors in the cache we disable it.
545 ToggleMirrorCache(false); 545 ToggleMirrorCache(false);
546 546
547 return DebuggerScript; 547 return DebuggerScript;
548 })(); 548 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698