Chromium Code Reviews| 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); |
| + } |
| } |