Index: third_party/WebKit/Source/devtools/front_end/sources/ScopeChainSidebarPane.js |
diff --git a/third_party/WebKit/Source/devtools/front_end/sources/ScopeChainSidebarPane.js b/third_party/WebKit/Source/devtools/front_end/sources/ScopeChainSidebarPane.js |
index bf8f41881ef1ca94ee528af5ee9c8c17861a519f..aef00c7de9ba854df751ba434672ec8f35c93971 100644 |
--- a/third_party/WebKit/Source/devtools/front_end/sources/ScopeChainSidebarPane.js |
+++ b/third_party/WebKit/Source/devtools/front_end/sources/ScopeChainSidebarPane.js |
@@ -26,36 +26,48 @@ |
/** |
* @constructor |
- * @extends {WebInspector.SimpleView} |
+ * @extends {WebInspector.VBox} |
+ * @implements {WebInspector.ContextFlavorListener} |
*/ |
WebInspector.ScopeChainSidebarPane = function() |
{ |
- WebInspector.SimpleView.call(this, WebInspector.UIString("Scope")); |
+ WebInspector.VBox.call(this); |
this._expandController = new WebInspector.ObjectPropertiesSectionExpandController(); |
this._linkifier = new WebInspector.Linkifier(); |
- WebInspector.context.addFlavorChangeListener(WebInspector.DebuggerModel.CallFrame, this._update, this); |
+ this._update(); |
} |
WebInspector.ScopeChainSidebarPane._pathSymbol = Symbol("path"); |
WebInspector.ScopeChainSidebarPane.prototype = { |
+ /** |
+ * @override |
+ * @param {?Object} object |
+ */ |
+ flavorChanged: function(object) |
+ { |
+ this._update(); |
+ }, |
+ |
_update: function() |
{ |
var callFrame = WebInspector.context.flavor(WebInspector.DebuggerModel.CallFrame); |
+ var details = WebInspector.context.flavor(WebInspector.DebuggerPausedDetails); |
this._linkifier.reset(); |
WebInspector.SourceMapNamesResolver.resolveThisObject(callFrame) |
- .then(this._innerUpdate.bind(this, callFrame)); |
+ .then(this._innerUpdate.bind(this, details, callFrame)); |
}, |
/** |
+ * @param {?WebInspector.DebuggerPausedDetails} details |
* @param {?WebInspector.DebuggerModel.CallFrame} callFrame |
* @param {?WebInspector.RemoteObject} thisObject |
*/ |
- _innerUpdate: function(callFrame, thisObject) |
+ _innerUpdate: function(details, callFrame, thisObject) |
{ |
this.element.removeChildren(); |
- if (!callFrame) { |
+ if (!details || !callFrame) { |
var infoElement = createElement("div"); |
infoElement.className = "gray-info-message"; |
infoElement.textContent = WebInspector.UIString("Not Paused"); |
@@ -79,7 +91,6 @@ WebInspector.ScopeChainSidebarPane.prototype = { |
if (thisObject) |
extraProperties.push(new WebInspector.RemoteObjectProperty("this", thisObject)); |
if (i === 0) { |
- var details = callFrame.debuggerModel.debuggerPausedDetails(); |
var exception = details.exception(); |
if (exception) |
extraProperties.push(new WebInspector.RemoteObjectProperty(WebInspector.UIString.capitalize("Exception"), exception, undefined, undefined, undefined, undefined, undefined, true)); |
@@ -137,5 +148,5 @@ WebInspector.ScopeChainSidebarPane.prototype = { |
_sidebarPaneUpdatedForTest: function() { }, |
- __proto__: WebInspector.SimpleView.prototype |
+ __proto__: WebInspector.VBox.prototype |
} |