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

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

Issue 729513002: DevTools: Gracefully ignore unknown variable scopes. (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/core/v8/DebuggerScript.js
diff --git a/Source/bindings/core/v8/DebuggerScript.js b/Source/bindings/core/v8/DebuggerScript.js
index f15e05f0b782dcf3c1d956188085fcecd566c8b5..06a0539f2325250263abb860f0d02f8494620d07 100644
--- a/Source/bindings/core/v8/DebuggerScript.js
+++ b/Source/bindings/core/v8/DebuggerScript.js
@@ -77,10 +77,13 @@ DebuggerScript.getFunctionScopes = function(fun)
var result = [];
for (var i = 0; i < count; i++) {
var scopeDetails = mirror.scope(i).details();
- result[i] = {
+ var scopeObject = DebuggerScript._buildScopeObject(scopeDetails.type(), scopeDetails.object());
yurys 2014/11/14 16:08:55 Why not support the new scope type instead? New sc
+ if (!scopeObject)
+ continue;
+ result.push({
type: scopeDetails.type(),
- object: DebuggerScript._buildScopeObject(scopeDetails.type(), scopeDetails.object())
- };
+ object: scopeObject
+ });
}
return result;
}
@@ -382,8 +385,11 @@ DebuggerScript._frameMirrorToJSCallFrame = function(frameMirror, callerFrame, sc
{
if (!scopeChain) {
scopeChain = [];
- for (var i = 0; i < scopeObjects.length; ++i)
- scopeChain.push(DebuggerScript._buildScopeObject(scopeTypes[i], scopeObjects[i]));
+ for (var i = 0; i < scopeObjects.length; ++i) {
+ var scopeObject = DebuggerScript._buildScopeObject(scopeDetails.type(), scopeDetails.object());
+ if (scopeObject)
+ scopeChain.push(scopeObject);
+ }
scopeObjects = null; // Free for GC.
}
return scopeChain;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698