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

Unified Diff: Source/devtools/front_end/sources/ScopeChainSidebarPane.js

Issue 738733006: DevTools: Support harmony variable scopes. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: addressed 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 | « Source/devtools/front_end/components/ObjectPropertiesSection.js ('k') | Source/devtools/protocol.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/sources/ScopeChainSidebarPane.js
diff --git a/Source/devtools/front_end/sources/ScopeChainSidebarPane.js b/Source/devtools/front_end/sources/ScopeChainSidebarPane.js
index ed08dff16d3210efa620b1c462337fc206d9c248..00597fd0cb876e3d57fecf2bda2337568c6c0c2f 100644
--- a/Source/devtools/front_end/sources/ScopeChainSidebarPane.js
+++ b/Source/devtools/front_end/sources/ScopeChainSidebarPane.js
@@ -69,17 +69,15 @@ WebInspector.ScopeChainSidebarPane.prototype = {
for (var i = 0; i < scopeChain.length; ++i) {
var scope = scopeChain[i];
var title = null;
- var subtitle = scope.object.description;
var emptyPlaceholder = null;
var extraProperties = [];
- var declarativeScope;
+ var declarativeScope = true;
switch (scope.type) {
case DebuggerAgent.ScopeType.Local:
foundLocalScope = true;
title = WebInspector.UIString("Local");
emptyPlaceholder = WebInspector.UIString("No Variables");
- subtitle = undefined;
var thisObject = callFrame.thisObject();
if (thisObject)
extraProperties.push(new WebInspector.RemoteObjectProperty("this", thisObject));
@@ -94,18 +92,19 @@ WebInspector.ScopeChainSidebarPane.prototype = {
if (returnValue)
extraProperties.push(new WebInspector.RemoteObjectProperty("<return>", returnValue));
}
- declarativeScope = true;
break;
case DebuggerAgent.ScopeType.Closure:
title = WebInspector.UIString("Closure");
emptyPlaceholder = WebInspector.UIString("No Variables");
- subtitle = undefined;
- declarativeScope = true;
break;
case DebuggerAgent.ScopeType.Catch:
title = WebInspector.UIString("Catch");
- subtitle = undefined;
- declarativeScope = true;
+ break;
+ case DebuggerAgent.ScopeType.Block:
+ title = WebInspector.UIString("Block");
+ break;
+ case DebuggerAgent.ScopeType.Script:
+ title = WebInspector.UIString("Script");
break;
case DebuggerAgent.ScopeType.With:
title = WebInspector.UIString("With Block");
@@ -117,6 +116,7 @@ WebInspector.ScopeChainSidebarPane.prototype = {
break;
}
+ var subtitle = declarativeScope ? undefined : scope.object.description;
if (!title || title === subtitle)
subtitle = undefined;
« no previous file with comments | « Source/devtools/front_end/components/ObjectPropertiesSection.js ('k') | Source/devtools/protocol.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698