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

Unified Diff: third_party/WebKit/Source/devtools/front_end/bindings/CompilerScriptMapping.js

Issue 2931773002: DevTools: kill DebuggerWorkspaceBinding.{push,pop,set}SourceMapping (Closed)
Patch Set: address comments Created 3 years, 6 months 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
Index: third_party/WebKit/Source/devtools/front_end/bindings/CompilerScriptMapping.js
diff --git a/third_party/WebKit/Source/devtools/front_end/bindings/CompilerScriptMapping.js b/third_party/WebKit/Source/devtools/front_end/bindings/CompilerScriptMapping.js
index 16bf022c64f9a4999f7aa951ae9c7a5cce3614ec..612ab4a4ace435ab6b5306fa845d5f2f116faca9 100644
--- a/third_party/WebKit/Source/devtools/front_end/bindings/CompilerScriptMapping.js
+++ b/third_party/WebKit/Source/devtools/front_end/bindings/CompilerScriptMapping.js
@@ -181,7 +181,7 @@ Bindings.CompilerScriptMapping = class {
var script = /** @type {!SDK.Script} */ (event.data);
// Create stub UISourceCode for the time source mapping is being loaded.
this._addStubUISourceCode(script);
- this._debuggerWorkspaceBinding.pushSourceMapping(script, this);
+ this._debuggerWorkspaceBinding.updateLocations(script);
}
/**
@@ -220,12 +220,10 @@ Bindings.CompilerScriptMapping = class {
var project = script.isContentScript() ? this._contentScriptsProject : this._regularProject;
for (var sourceURL of sourceMap.sourceURLs()) {
var uiSourceCode = /** @type {!Workspace.UISourceCode} */ (project.uiSourceCodeForURL(sourceURL));
- if (hasOtherScripts) {
+ if (hasOtherScripts)
Bindings.NetworkProject.removeFrameAttribution(uiSourceCode, frameId);
- } else {
- this._debuggerWorkspaceBinding.setSourceMapping(this._debuggerModel, uiSourceCode, null);
+ else
project.removeFile(sourceURL);
- }
}
this._debuggerWorkspaceBinding.updateLocations(script);
}
@@ -278,26 +276,17 @@ Bindings.CompilerScriptMapping = class {
uiSourceCode[Bindings.CompilerScriptMapping._sourceMapSymbol] = sourceMap;
Bindings.NetworkProject.setInitialFrameAttribution(uiSourceCode, frameId);
project.addUISourceCodeWithProvider(uiSourceCode, contentProvider, metadata, mimeType);
- this._debuggerWorkspaceBinding.setSourceMapping(this._debuggerModel, uiSourceCode, this);
}
this._debuggerWorkspaceBinding.updateLocations(script);
}
- /**
- * @override
- * @return {boolean}
- */
- isIdentity() {
- return false;
- }
-
/**
* @override
* @param {!Workspace.UISourceCode} uiSourceCode
* @param {number} lineNumber
* @return {boolean}
*/
- uiLineHasMapping(uiSourceCode, lineNumber) {
+ static uiLineHasMapping(uiSourceCode, lineNumber) {
var sourceMap = uiSourceCode[Bindings.CompilerScriptMapping._sourceMapSymbol];
if (!sourceMap)
return true;
@@ -313,4 +302,4 @@ Bindings.CompilerScriptMapping = class {
};
Bindings.CompilerScriptMapping._frameIdSymbol = Symbol('Bindings.CompilerScriptMapping._frameIdSymbol');
-Bindings.CompilerScriptMapping._sourceMapSymbol = Symbol('Bindings.CompilerScriptMapping._sourceMapSymbol');
+Bindings.CompilerScriptMapping._sourceMapSymbol = Symbol('Bindings.CompilerScriptMapping._sourceMapSymbol');

Powered by Google App Engine
This is Rietveld 408576698