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 78f6ebd7e0c9f633cbd13171b33ed82c6728f53d..256dc7a1e1811371943f940f77c11be7b1119f2f 100644 |
--- a/third_party/WebKit/Source/devtools/front_end/bindings/DebuggerWorkspaceBinding.js |
+++ b/third_party/WebKit/Source/devtools/front_end/bindings/DebuggerWorkspaceBinding.js |
@@ -385,8 +385,10 @@ WebInspector.DebuggerWorkspaceBinding.TargetData = function(debuggerModel, debug |
/** @type {!Map.<!WebInspector.UISourceCode, !WebInspector.DebuggerSourceMapping>} */ |
this._uiSourceCodeToSourceMapping = new Map(); |
- debuggerModel.addEventListener(WebInspector.DebuggerModel.Events.ParsedScriptSource, this._parsedScriptSource, this); |
- debuggerModel.addEventListener(WebInspector.DebuggerModel.Events.FailedToParseScriptSource, this._parsedScriptSource, this); |
+ this._eventListeners = [ |
+ debuggerModel.addEventListener(WebInspector.DebuggerModel.Events.ParsedScriptSource, this._parsedScriptSource, this), |
+ debuggerModel.addEventListener(WebInspector.DebuggerModel.Events.FailedToParseScriptSource, this._parsedScriptSource, this) |
+ ]; |
} |
WebInspector.DebuggerWorkspaceBinding.TargetData.prototype = { |
@@ -453,6 +455,7 @@ WebInspector.DebuggerWorkspaceBinding.TargetData.prototype = { |
_dispose: function() |
{ |
+ WebInspector.EventTarget.removeEventListeners(this._eventListeners); |
this._compilerMapping.dispose(); |
this._resourceMapping.dispose(); |
this._defaultMapping.dispose(); |