| 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..49977602fc35469585ea8ba478f693366ca6787c 100644
|
| --- a/third_party/WebKit/Source/devtools/front_end/bindings/ResourceScriptMapping.js
|
| +++ b/third_party/WebKit/Source/devtools/front_end/bindings/ResourceScriptMapping.js
|
| @@ -87,7 +87,8 @@ Bindings.ResourceScriptMapping = class {
|
| */
|
| uiLocationToRawLocation(uiSourceCode, lineNumber, columnNumber) {
|
| var scripts = this._scriptsForUISourceCode(uiSourceCode);
|
| - console.assert(scripts.length);
|
| + if (!scripts.length)
|
| + return null;
|
| var script = scripts[scripts.length - 1];
|
| if (script.isInlineScriptWithSourceURL()) {
|
| return this._debuggerModel.createRawLocationByURL(
|
| @@ -103,7 +104,6 @@ Bindings.ResourceScriptMapping = class {
|
| addScript(script) {
|
| if (script.isAnonymousScript())
|
| return;
|
| - this._debuggerWorkspaceBinding.pushSourceMapping(script, this);
|
|
|
| var uiSourceCode = this._workspaceUISourceCodeForScript(script);
|
| if (!uiSourceCode)
|
| @@ -112,24 +112,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 +204,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,8 +216,9 @@ Bindings.ResourceScriptMapping = class {
|
| scriptFile.dispose();
|
| this._setScriptFile(uiSourceCode, null);
|
| }
|
| - this._debuggerWorkspaceBinding.setSourceMapping(this._debuggerModel, uiSourceCode, null);
|
| this._boundUISourceCodes.delete(uiSourceCode);
|
| + if (scriptFile._script)
|
| + this._debuggerWorkspaceBinding.updateLocations(scriptFile._script);
|
| }
|
|
|
| _debuggerReset() {
|
|
|