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

Unified Diff: third_party/WebKit/Source/devtools/front_end/bindings/DefaultScriptMapping.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/DefaultScriptMapping.js
diff --git a/third_party/WebKit/Source/devtools/front_end/bindings/DefaultScriptMapping.js b/third_party/WebKit/Source/devtools/front_end/bindings/DefaultScriptMapping.js
index c98dce7f8d2999cf10864436f158c99d8588d535..985de7dc9e152680a92ca4090542e1d32838a50d 100644
--- a/third_party/WebKit/Source/devtools/front_end/bindings/DefaultScriptMapping.js
+++ b/third_party/WebKit/Source/devtools/front_end/bindings/DefaultScriptMapping.js
@@ -88,6 +88,8 @@ Bindings.DefaultScriptMapping = class {
*/
uiLocationToRawLocation(uiSourceCode, lineNumber, columnNumber) {
var script = uiSourceCode[Bindings.DefaultScriptMapping._scriptSymbol];
+ if (!script)
+ return null;
if (script.isInlineScriptWithSourceURL()) {
return this._debuggerModel.createRawLocation(
script, lineNumber + script.lineOffset, lineNumber ? columnNumber : columnNumber + script.columnOffset);
@@ -106,9 +108,7 @@ Bindings.DefaultScriptMapping = class {
uiSourceCode[Bindings.DefaultScriptMapping._scriptSymbol] = script;
script[Bindings.DefaultScriptMapping._uiSourceCodeSymbol] = uiSourceCode;
this._project.addUISourceCodeWithProvider(uiSourceCode, script, null, 'text/javascript');
-
- this._debuggerWorkspaceBinding.setSourceMapping(this._debuggerModel, uiSourceCode, this);
- this._debuggerWorkspaceBinding.pushSourceMapping(script, this);
+ this._debuggerWorkspaceBinding.updateLocations(script);
}
/**
@@ -123,24 +123,6 @@ Bindings.DefaultScriptMapping = class {
this._project.removeUISourceCode(uiSourceCode.url());
}
- /**
- * @override
- * @return {boolean}
- */
- isIdentity() {
- return true;
- }
-
- /**
- * @override
- * @param {!Workspace.UISourceCode} uiSourceCode
- * @param {number} lineNumber
- * @return {boolean}
- */
- uiLineHasMapping(uiSourceCode, lineNumber) {
- return true;
- }
-
_debuggerReset() {
this._project.reset();
}

Powered by Google App Engine
This is Rietveld 408576698