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

Unified Diff: Source/bindings/v8/DebuggerScript.js

Issue 136333007: DevTools: Implement evaluation on async call frames. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: Source/bindings/v8/DebuggerScript.js
diff --git a/Source/bindings/v8/DebuggerScript.js b/Source/bindings/v8/DebuggerScript.js
index 2f92b48013e578d2fd7170acb3e8ad7f0236f3da..c61c5bcf0c1e19f7483ddc43b61bfd7a56aa8234 100644
--- a/Source/bindings/v8/DebuggerScript.js
+++ b/Source/bindings/v8/DebuggerScript.js
@@ -207,7 +207,7 @@ DebuggerScript.currentCallFrame = function(execState, maximumLimit)
var topFrame = undefined;
for (var i = frameCount - 1; i >= 0; i--) {
var frameMirror = execState.frame(i);
- topFrame = DebuggerScript._frameMirrorToJSCallFrame(frameMirror, topFrame);
+ topFrame = DebuggerScript._frameMirrorToJSCallFrame(execState, frameMirror, topFrame);
}
return topFrame;
}
@@ -310,7 +310,7 @@ DebuggerScript.isEvalCompilation = function(eventData)
return (script.compilationType() === Debug.ScriptCompilationType.Eval);
}
-DebuggerScript._frameMirrorToJSCallFrame = function(frameMirror, callerFrame)
+DebuggerScript._frameMirrorToJSCallFrame = function(execState, frameMirror, callerFrame)
{
// Get function name and display name.
var funcMirror;
@@ -349,9 +349,14 @@ DebuggerScript._frameMirrorToJSCallFrame = function(frameMirror, callerFrame)
scopeChain.push(DebuggerScript._buildScopeObject(scopeMirror));
}
- function evaluate(expression)
+ function evaluate(expression, contextExtension)
{
- return frameMirror.evaluate(expression, false).value();
+ return frameMirror.evaluate(expression, false, contextExtension).value();
+ }
+
+ function evaluateGlobal(expression, contextExtension)
+ {
+ return execState.evaluateGlobal(expression, false, contextExtension).value();
}
function restart()
@@ -395,6 +400,7 @@ DebuggerScript._frameMirrorToJSCallFrame = function(frameMirror, callerFrame)
"scopeChain": scopeChain,
"scopeType": scopeType,
"evaluate": evaluate,
+ "evaluateGlobal": evaluateGlobal,
"caller": callerFrame,
"restart": restart,
"setVariableValue": setVariableValue,

Powered by Google App Engine
This is Rietveld 408576698