Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (183317 => 183318)
--- trunk/Source/WebInspectorUI/ChangeLog 2015-04-25 23:47:41 UTC (rev 183317)
+++ trunk/Source/WebInspectorUI/ChangeLog 2015-04-26 00:59:47 UTC (rev 183318)
@@ -1,3 +1,30 @@
+2015-04-25 Timothy Hatcher <[email protected]>
+
+ Web Inspector: Make closing ContentViews more leak proof
+ https://bugs.webkit.org/show_bug.cgi?id=144200
+
+ Remove all listeners on the target objects in close that match the this object.
+ This makes things more foolproof when something changes or a new listener is
+ added to the same object. TimelineRecordingContentView also had a leak where
+ TimelineManager and DebuggerManager listeners were not being removed.
+
+ Reviewed by Darin Adler.
+
+ * UserInterface/Views/ApplicationCacheFrameContentView.js:
+ (WebInspector.ApplicationCacheFrameContentView.prototype.closed):
+ * UserInterface/Views/ClusterContentView.js:
+ (WebInspector.ClusterContentView.prototype.closed):
+ * UserInterface/Views/ContentFlowDOMTreeContentView.js:
+ (WebInspector.ContentFlowDOMTreeContentView.prototype.closed):
+ * UserInterface/Views/FrameDOMTreeContentView.js:
+ (WebInspector.FrameDOMTreeContentView.prototype.closed):
+ * UserInterface/Views/ResourceContentView.js:
+ (WebInspector.ResourceContentView.prototype.closed):
+ * UserInterface/Views/TextResourceContentView.js:
+ (WebInspector.TextResourceContentView.prototype.closed):
+ * UserInterface/Views/TimelineRecordingContentView.js:
+ (WebInspector.TimelineRecordingContentView.prototype.closed):
+
2015-04-25 Tobias Reiss <[email protected]>
Web Inspector: assertion failure when editing inline styles
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ApplicationCacheFrameContentView.js (183317 => 183318)
--- trunk/Source/WebInspectorUI/UserInterface/Views/ApplicationCacheFrameContentView.js 2015-04-25 23:47:41 UTC (rev 183317)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ApplicationCacheFrameContentView.js 2015-04-26 00:59:47 UTC (rev 183318)
@@ -65,7 +65,7 @@
closed: function()
{
- WebInspector.applicationCacheManager.removeEventListener(WebInspector.ApplicationCacheManager.Event.FrameManifestStatusChanged, this._updateStatus, this);
+ WebInspector.applicationCacheManager.removeEventListener(null, null, this);
},
updateLayout: function()
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ClusterContentView.js (183317 => 183318)
--- trunk/Source/WebInspectorUI/UserInterface/Views/ClusterContentView.js 2015-04-25 23:47:41 UTC (rev 183317)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ClusterContentView.js 2015-04-26 00:59:47 UTC (rev 183318)
@@ -84,9 +84,7 @@
{
this._contentViewContainer.closeAllContentViews();
- WebInspector.ContentView.removeEventListener(WebInspector.ContentView.Event.SelectionPathComponentsDidChange, this._contentViewSelectionPathComponentDidChange, this);
- WebInspector.ContentView.removeEventListener(WebInspector.ContentView.Event.SupplementalRepresentedObjectsDidChange, this._contentViewSupplementalRepresentedObjectsDidChange, this);
- WebInspector.ContentView.removeEventListener(WebInspector.ContentView.Event.NumberOfSearchResultsDidChange, this._contentViewNumberOfSearchResultsDidChange, this);
+ WebInspector.ContentView.removeEventListener(null, null, this);
},
canGoBack: function()
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ContentFlowDOMTreeContentView.js (183317 => 183318)
--- trunk/Source/WebInspectorUI/UserInterface/Views/ContentFlowDOMTreeContentView.js 2015-04-25 23:47:41 UTC (rev 183317)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ContentFlowDOMTreeContentView.js 2015-04-26 00:59:47 UTC (rev 183318)
@@ -47,8 +47,8 @@
closed: function()
{
- this.representedObject.removeEventListener(WebInspector.ContentFlow.Event.ContentNodeWasAdded, this._contentNodeWasAdded, this);
- this.representedObject.removeEventListener(WebInspector.ContentFlow.Event.ContentNodeWasRemoved, this._contentNodeWasRemoved, this);
+ this.representedObject.removeEventListener(null, null, this);
+
WebInspector.DOMTreeContentView.prototype.closed.call(this);
},
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/FrameDOMTreeContentView.js (183317 => 183318)
--- trunk/Source/WebInspectorUI/UserInterface/Views/FrameDOMTreeContentView.js 2015-04-25 23:47:41 UTC (rev 183317)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/FrameDOMTreeContentView.js 2015-04-26 00:59:47 UTC (rev 183318)
@@ -55,6 +55,7 @@
closed: function()
{
this._domTree.removeEventListener(null, null, this);
+
WebInspector.DOMTreeContentView.prototype.closed.call(this);
},
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ResourceContentView.js (183317 => 183318)
--- trunk/Source/WebInspectorUI/UserInterface/Views/ResourceContentView.js 2015-04-25 23:47:41 UTC (rev 183317)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ResourceContentView.js 2015-04-26 00:59:47 UTC (rev 183318)
@@ -79,7 +79,7 @@
closed: function()
{
if (!this.managesOwnIssues)
- WebInspector.issueManager.removeEventListener(WebInspector.IssueManager.Event.IssueWasAdded, this._issueWasAdded, this);
+ WebInspector.issueManager.removeEventListener(null, null, this);
},
// Private
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TextResourceContentView.js (183317 => 183318)
--- trunk/Source/WebInspectorUI/UserInterface/Views/TextResourceContentView.js 2015-04-25 23:47:41 UTC (rev 183317)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TextResourceContentView.js 2015-04-26 00:59:47 UTC (rev 183318)
@@ -121,7 +121,7 @@
{
WebInspector.ResourceContentView.prototype.closed.call(this);
- this.resource.removeEventListener(WebInspector.SourceCode.Event.ContentDidChange, this._sourceCodeContentDidChange, this);
+ this.resource.removeEventListener(null, null, this);
this._textEditor.close();
},
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRecordingContentView.js (183317 => 183318)
--- trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRecordingContentView.js 2015-04-25 23:47:41 UTC (rev 183317)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRecordingContentView.js 2015-04-26 00:59:47 UTC (rev 183318)
@@ -188,8 +188,11 @@
{
this._contentViewContainer.closeAllContentViews();
- WebInspector.ContentView.removeEventListener(WebInspector.ContentView.Event.SelectionPathComponentsDidChange, this._contentViewSelectionPathComponentDidChange, this);
- WebInspector.ContentView.removeEventListener(WebInspector.ContentView.Event.SupplementalRepresentedObjectsDidChange, this._contentViewSupplementalRepresentedObjectsDidChange, this);
+ this._recording.removeEventListener(null, null, this);
+
+ WebInspector.timelineManager.removeEventListener(null, null, this);
+ WebInspector.debuggerManager.removeEventListener(null, null, this);
+ WebInspector.ContentView.removeEventListener(null, null, this);
},
canGoBack: function()