Chromium Code Reviews| Index: third_party/WebKit/Source/devtools/front_end/bindings/ResourceScriptMapping.js |
| diff --git a/third_party/WebKit/Source/devtools/front_end/bindings/ResourceScriptMapping.js b/third_party/WebKit/Source/devtools/front_end/bindings/ResourceScriptMapping.js |
| index fead0412987252f41683620d8c1ef01f5e6f5042..ad44d04efb23d25accbcb4db4427463fe922f5ae 100644 |
| --- a/third_party/WebKit/Source/devtools/front_end/bindings/ResourceScriptMapping.js |
| +++ b/third_party/WebKit/Source/devtools/front_end/bindings/ResourceScriptMapping.js |
| @@ -87,6 +87,8 @@ Bindings.ResourceScriptMapping = class { |
| */ |
| uiLocationToRawLocation(uiSourceCode, lineNumber, columnNumber) { |
| var scripts = this._scriptsForUISourceCode(uiSourceCode); |
| + if (!scripts.length) |
| + return null; |
| console.assert(scripts.length); |
|
dgozman
2017/06/08 19:12:00
Remove assert.
lushnikov
2017/06/08 21:14:34
Done.
|
| var script = scripts[scripts.length - 1]; |
| if (script.isInlineScriptWithSourceURL()) { |
| @@ -103,7 +105,6 @@ Bindings.ResourceScriptMapping = class { |
| addScript(script) { |
| if (script.isAnonymousScript()) |
| return; |
| - this._debuggerWorkspaceBinding.pushSourceMapping(script, this); |
| var uiSourceCode = this._workspaceUISourceCodeForScript(script); |
| if (!uiSourceCode) |
| @@ -112,24 +113,6 @@ Bindings.ResourceScriptMapping = class { |
| this._bindUISourceCodeToScripts(uiSourceCode, [script]); |
| } |
| - /** |
| - * @override |
| - * @return {boolean} |
| - */ |
| - isIdentity() { |
| - return true; |
| - } |
| - |
| - /** |
| - * @override |
| - * @param {!Workspace.UISourceCode} uiSourceCode |
| - * @param {number} lineNumber |
| - * @return {boolean} |
| - */ |
| - uiLineHasMapping(uiSourceCode, lineNumber) { |
| - return true; |
| - } |
| - |
| /** |
| * @param {!Workspace.UISourceCode} uiSourceCode |
| * @return {?Bindings.ResourceScriptFile} |
| @@ -222,7 +205,6 @@ Bindings.ResourceScriptMapping = class { |
| this._setScriptFile(uiSourceCode, scriptFile); |
| for (var i = 0; i < scripts.length; ++i) |
| this._debuggerWorkspaceBinding.updateLocations(scripts[i]); |
| - this._debuggerWorkspaceBinding.setSourceMapping(this._debuggerModel, uiSourceCode, this); |
| this._boundUISourceCodes.add(uiSourceCode); |
| } |
| @@ -235,7 +217,6 @@ Bindings.ResourceScriptMapping = class { |
| scriptFile.dispose(); |
| this._setScriptFile(uiSourceCode, null); |
| } |
| - this._debuggerWorkspaceBinding.setSourceMapping(this._debuggerModel, uiSourceCode, null); |
| this._boundUISourceCodes.delete(uiSourceCode); |
|
dgozman
2017/06/08 19:12:00
updateLocations here
lushnikov
2017/06/08 21:14:34
Done.
|
| } |