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

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

Issue 19064004: Support re-reading scope variables in protocol and on backed. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: follow code review Created 7 years, 5 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 5760f7d5f51f5aac582890e9e02b2422aa8deacb..dc1eaddf4e16cf362d3708a7d739e057c4682ad3 100644
--- a/Source/bindings/v8/DebuggerScript.js
+++ b/Source/bindings/v8/DebuggerScript.js
@@ -324,7 +324,6 @@ DebuggerScript._frameMirrorToJSCallFrame = function(frameMirror, callerFrame)
// Get this object.
var thisObject = frameMirror.details_.receiver();
- // Get scope chain array in format: [<scope type>, <scope object>, <scope type>, <scope object>,...]
var scopeChain = [];
var scopeType = [];
for (var i = 0; i < frameMirror.scopeCount(); i++) {
@@ -333,6 +332,14 @@ DebuggerScript._frameMirrorToJSCallFrame = function(frameMirror, callerFrame)
scopeChain.push(DebuggerScript._buildScopeObject(scopeMirror));
}
+ // Updates the existing array.
+ function rereadScopes() {
+ for (var i = 0; i < frameMirror.scopeCount(); i++) {
+ var scopeMirror = frameMirror.scope(i);
+ scopeChain[i] = DebuggerScript._buildScopeObject(scopeMirror);
+ }
+ }
+
function evaluate(expression)
{
return frameMirror.evaluate(expression, false).value();
@@ -359,7 +366,8 @@ DebuggerScript._frameMirrorToJSCallFrame = function(frameMirror, callerFrame)
"evaluate": evaluate,
"caller": callerFrame,
"restart": restart,
- "setVariableValue": setVariableValue
+ "setVariableValue": setVariableValue,
+ "rereadScopes": rereadScopes
};
}
« no previous file with comments | « LayoutTests/inspector-protocol/debugger/updateCallFrameScopes-expected.txt ('k') | Source/core/inspector/InjectedScript.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698