Web Inspector: Make closing ContentViews more leak proof
authortimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 26 Apr 2015 00:59:47 +0000 (00:59 +0000)
committertimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 26 Apr 2015 00:59:47 +0000 (00:59 +0000)
commitd9ef6d3237b512ee95adb74b85ad999003411fa0
tree57831961a934e640d27e051b4ce0bf3063df8083
parentfe7b664c7e5653e9c407a8e923353360b107c81c
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):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183318 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Views/ApplicationCacheFrameContentView.js
Source/WebInspectorUI/UserInterface/Views/ClusterContentView.js
Source/WebInspectorUI/UserInterface/Views/ContentFlowDOMTreeContentView.js
Source/WebInspectorUI/UserInterface/Views/FrameDOMTreeContentView.js
Source/WebInspectorUI/UserInterface/Views/ResourceContentView.js
Source/WebInspectorUI/UserInterface/Views/TextResourceContentView.js
Source/WebInspectorUI/UserInterface/Views/TimelineRecordingContentView.js