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

Unified Diff: third_party/WebKit/Source/devtools/front_end/snippets/ScriptSnippetModel.js

Issue 2931773002: DevTools: kill DebuggerWorkspaceBinding.{push,pop,set}SourceMapping (Closed)
Patch Set: 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/snippets/ScriptSnippetModel.js
diff --git a/third_party/WebKit/Source/devtools/front_end/snippets/ScriptSnippetModel.js b/third_party/WebKit/Source/devtools/front_end/snippets/ScriptSnippetModel.js
index 585fb32650fa15f7a659fd01f1febcfa93105c2a..048ff8b7b1a4ac2eab411e86690ed016337c444c 100644
--- a/third_party/WebKit/Source/devtools/front_end/snippets/ScriptSnippetModel.js
+++ b/third_party/WebKit/Source/devtools/front_end/snippets/ScriptSnippetModel.js
@@ -354,6 +354,7 @@ Snippets.SnippetScriptMapping = class {
this._scriptForUISourceCode = new Map();
/** @type {!Map.<!Workspace.UISourceCode, number>} */
this._evaluationIndexForUISourceCode = new Map();
+ Bindings.debuggerWorkspaceBinding.addSourceMapping(this);
dgozman 2017/06/08 19:12:00 Move this to ScriptSnippetModel instead.
lushnikov 2017/06/08 21:14:34 Done.
debuggerModel.addEventListener(SDK.DebuggerModel.Events.GlobalObjectCleared, this._reset, this);
}
@@ -437,10 +438,9 @@ Snippets.SnippetScriptMapping = class {
*/
_addScript(script, uiSourceCode) {
console.assert(!this._scriptForUISourceCode.get(uiSourceCode));
- Bindings.debuggerWorkspaceBinding.setSourceMapping(this._debuggerModel, uiSourceCode, this);
this._uiSourceCodeForScriptId[script.scriptId] = uiSourceCode;
this._scriptForUISourceCode.set(uiSourceCode, script);
- Bindings.debuggerWorkspaceBinding.pushSourceMapping(script, this);
+ Bindings.debuggerWorkspaceBinding.updateLocations(script);
}
/**
@@ -457,24 +457,6 @@ Snippets.SnippetScriptMapping = class {
if (scriptUISourceCode)
this._scriptSnippetModel._restoreBreakpoints(scriptUISourceCode, breakpointLocations);
}
-
- /**
- * @override
- * @return {boolean}
- */
- isIdentity() {
- return false;
- }
-
- /**
- * @override
- * @param {!Workspace.UISourceCode} uiSourceCode
- * @param {number} lineNumber
- * @return {boolean}
- */
- uiLineHasMapping(uiSourceCode, lineNumber) {
- return true;
- }
};
/**

Powered by Google App Engine
This is Rietveld 408576698