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

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

Issue 2298373002: DevTools: remove indirection between CSSWorkspaceBindings and CSS mappings (Closed)
Patch Set: Created 4 years, 4 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/SASSSourceMapping.js
diff --git a/third_party/WebKit/Source/devtools/front_end/bindings/SASSSourceMapping.js b/third_party/WebKit/Source/devtools/front_end/bindings/SASSSourceMapping.js
index f1ab55a809c9beea72d66841fef1d96c6e76016d..a619b74492fc3b518a8d15825e9b153c5fcd309f 100644
--- a/third_party/WebKit/Source/devtools/front_end/bindings/SASSSourceMapping.js
+++ b/third_party/WebKit/Source/devtools/front_end/bindings/SASSSourceMapping.js
@@ -39,9 +39,11 @@ WebInspector.SASSSourceMapping = function(cssModel, networkMapping, networkProje
this._cssModel = cssModel;
this._networkProject = networkProject;
this._networkMapping = networkMapping;
- this._cssModel.addEventListener(WebInspector.CSSModel.Events.SourceMapAttached, this._sourceMapAttached, this);
- this._cssModel.addEventListener(WebInspector.CSSModel.Events.SourceMapDetached, this._sourceMapDetached, this);
- this._cssModel.addEventListener(WebInspector.CSSModel.Events.SourceMapChanged, this._sourceMapChanged, this);
+ this._eventListeners = [
+ this._cssModel.addEventListener(WebInspector.CSSModel.Events.SourceMapAttached, this._sourceMapAttached, this),
+ this._cssModel.addEventListener(WebInspector.CSSModel.Events.SourceMapDetached, this._sourceMapDetached, this),
+ this._cssModel.addEventListener(WebInspector.CSSModel.Events.SourceMapChanged, this._sourceMapChanged, this)
+ ];
}
WebInspector.SASSSourceMapping.prototype = {
@@ -97,26 +99,6 @@ WebInspector.SASSSourceMapping.prototype = {
},
/**
- * @param {!WebInspector.CSSStyleSheetHeader} header
- */
- addHeader: function(header)
- {
- if (!header.sourceMapURL)
- return;
- WebInspector.cssWorkspaceBinding.updateLocations(header);
- },
-
- /**
- * @param {!WebInspector.CSSStyleSheetHeader} header
- */
- removeHeader: function(header)
- {
- if (!header.sourceMapURL)
- return;
- WebInspector.cssWorkspaceBinding.updateLocations(header);
dgozman 2016/09/01 00:49:25 Who calls this now?
lushnikov 2016/09/01 01:34:34 SourceMapDetached will call this (if there was a s
- },
-
- /**
* @param {!WebInspector.CSSLocation} rawLocation
* @return {?WebInspector.UILocation}
*/
@@ -133,4 +115,9 @@ WebInspector.SASSSourceMapping.prototype = {
return null;
return uiSourceCode.uiLocation(entry.sourceLineNumber || 0, entry.sourceColumnNumber);
},
+
+ dispose: function()
+ {
+ WebInspector.EventTarget.removeEventListeners(this._eventListeners);
+ }
}

Powered by Google App Engine
This is Rietveld 408576698