Web Inspector: DOMTree leaks on main resource changes
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 20 Aug 2015 04:09:14 +0000 (04:09 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 20 Aug 2015 04:09:14 +0000 (04:09 +0000)
commitc00405bc7ad7b67296f4863172cad729ad1a2d8b
tree187715770a3a9b2a77aa8248d3816eebaf1eccb0
parent63cfd1c4182090fd8c479eb66086d29777e354f0
Web Inspector: DOMTree leaks on main resource changes
https://bugs.webkit.org/show_bug.cgi?id=148158

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-08-19
Reviewed by Timothy Hatcher.

* UserInterface/Models/DOMTree.js:
(WebInspector.DOMTree.prototype.disconnect):
Add a way to disconnect the DOMTree and allow it to get garbage collected.

(WebInspector.DOMTree.prototype.invalidate.performInvalidate):
(WebInspector.DOMTree.prototype.invalidate):
(WebInspector.DOMTree.prototype._requestRootDOMNode):
(WebInspector.DOMTree.prototype._framePageExecutionContextChanged):
Remove some uses of the delete operator.

* UserInterface/Models/Frame.js:
(WebInspector.Frame.prototype.removeChildFrame):
(WebInspector.Frame.prototype.removeAllChildFrames):
(WebInspector.Frame.prototype._detachFromParentFrame):
When a frame gets removed from its parent, disconnect its DOMTree.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@188679 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Models/DOMTree.js
Source/WebInspectorUI/UserInterface/Models/Frame.js