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

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

Issue 2962063002: DevTools: eliminate {Default,Resource}ScriptMapping.addScript method (Closed)
Patch Set: remove code from breakpoint-manager.js 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/DebuggerWorkspaceBinding.js
diff --git a/third_party/WebKit/Source/devtools/front_end/bindings/DebuggerWorkspaceBinding.js b/third_party/WebKit/Source/devtools/front_end/bindings/DebuggerWorkspaceBinding.js
index 7f6501b314b9e3273be48f225184755f4eec0fbe..adce908219a7d11a33123eae1750e1147b7150d8 100644
--- a/third_party/WebKit/Source/devtools/front_end/bindings/DebuggerWorkspaceBinding.js
+++ b/third_party/WebKit/Source/devtools/front_end/bindings/DebuggerWorkspaceBinding.js
@@ -259,13 +259,6 @@ Bindings.DebuggerWorkspaceBinding.ModelData = class {
this._locations = new Multimap();
debuggerModel.setBeforePausedCallback(this._beforePaused.bind(this));
- this._eventListeners = [
- debuggerModel.addEventListener(SDK.DebuggerModel.Events.ParsedScriptSource, this._parsedScriptSource, this),
- debuggerModel.addEventListener(
- SDK.DebuggerModel.Events.FailedToParseScriptSource, this._parsedScriptSource, this),
- debuggerModel.addEventListener(
- SDK.DebuggerModel.Events.DiscardedAnonymousScriptSource, this._discardedScriptSource, this)
- ];
}
/**
@@ -336,26 +329,8 @@ Bindings.DebuggerWorkspaceBinding.ModelData = class {
return !!this._compilerMapping.mapsToSourceCode(debuggerPausedDetails.callFrames[0].location());
}
- /**
- * @param {!Common.Event} event
- */
- _parsedScriptSource(event) {
- var script = /** @type {!SDK.Script} */ (event.data);
- this._defaultMapping.addScript(script);
- this._resourceMapping.addScript(script);
- }
-
- /**
- * @param {!Common.Event} event
- */
- _discardedScriptSource(event) {
- var script = /** @type {!SDK.Script} */ (event.data);
- this._defaultMapping.removeScript(script);
- }
-
_dispose() {
this._debuggerModel.setBeforePausedCallback(null);
- Common.EventTarget.removeEventListeners(this._eventListeners);
this._compilerMapping.dispose();
this._resourceMapping.dispose();
this._defaultMapping.dispose();

Powered by Google App Engine
This is Rietveld 408576698