Index: third_party/WebKit/Source/devtools/front_end/sdk/DebuggerModel.js |
diff --git a/third_party/WebKit/Source/devtools/front_end/sdk/DebuggerModel.js b/third_party/WebKit/Source/devtools/front_end/sdk/DebuggerModel.js |
index 7312c980c7ab6079828771caea67357f30162114..60fcf439d074939482ae349357084dac86767572 100644 |
--- a/third_party/WebKit/Source/devtools/front_end/sdk/DebuggerModel.js |
+++ b/third_party/WebKit/Source/devtools/front_end/sdk/DebuggerModel.js |
@@ -1148,28 +1148,6 @@ SDK.DebuggerModel.CallFrame = class extends SDK.SDKObject { |
} |
this._debuggerAgent.restartFrame(this._payload.callFrameId, protocolCallback.bind(this)); |
} |
- |
- /** |
- * @param {function(!Object)} callback |
- */ |
- variableNames(callback) { |
- var result = {this: true}; |
- |
- function propertiesCollected(properties) { |
- for (var i = 0; properties && i < properties.length; ++i) |
- result[properties[i].name] = true; |
- if (--pendingRequests === 0) |
- callback(result); |
- } |
- |
- var scopeChain = this.scopeChain(); |
- var pendingRequests = scopeChain.length; |
- for (var i = 0; i < scopeChain.length; ++i) { |
- var scope = scopeChain[i]; |
- var object = scope.object(); |
- object.getAllProperties(false, propertiesCollected); |
- } |
- } |
}; |
@@ -1210,6 +1188,30 @@ SDK.DebuggerModel.Scope = class { |
} |
/** |
+ * @return {string} |
+ */ |
+ typeName() { |
+ switch (this._type) { |
+ case Protocol.Debugger.ScopeType.Local: |
+ return Common.UIString('Local'); |
+ case Protocol.Debugger.ScopeType.Closure: |
+ return Common.UIString('Closure'); |
+ case Protocol.Debugger.ScopeType.Catch: |
+ return Common.UIString('Catch'); |
+ case Protocol.Debugger.ScopeType.Block: |
+ return Common.UIString('Block'); |
+ case Protocol.Debugger.ScopeType.Script: |
+ return Common.UIString('Script'); |
+ case Protocol.Debugger.ScopeType.With: |
+ return Common.UIString('With Block'); |
+ case Protocol.Debugger.ScopeType.Global: |
+ return Common.UIString('Global'); |
+ } |
+ return ''; |
einbinder
2016/12/07 20:10:51
Fails silently. Maybe a warning?
pfeldman
2016/12/08 00:29:06
We don't really do asserts for code correctness in
|
+ } |
+ |
+ |
+ /** |
* @return {string|undefined} |
*/ |
name() { |