Web Inspector: memory leak in Resource panel.
authorloislo@chromium.org <loislo@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 10 Oct 2011 13:04:00 +0000 (13:04 +0000)
committerloislo@chromium.org <loislo@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 10 Oct 2011 13:04:00 +0000 (13:04 +0000)
https://bugs.webkit.org/show_bug.cgi?id=69754

Reviewed by Yury Semikhatsky.

* inspector/front-end/ResourcesPanel.js:
(WebInspector.ResourcesPanel.prototype.reset):
* inspector/front-end/View.js:
(WebInspector.View.prototype.childViews):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@97057 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/inspector/front-end/ResourcesPanel.js
Source/WebCore/inspector/front-end/View.js

index 3be8012b5b253c6bf8bd6a39358ccaef2e89331e..7b76cf18d9e893f76ecbc70ba39fee1619461842 100644 (file)
@@ -1,3 +1,15 @@
+2011-10-10  Ilya Tikhonovsky  <loislo@chromium.org>
+
+        Web Inspector: memory leak in Resource panel.
+        https://bugs.webkit.org/show_bug.cgi?id=69754
+
+        Reviewed by Yury Semikhatsky.
+
+        * inspector/front-end/ResourcesPanel.js:
+        (WebInspector.ResourcesPanel.prototype.reset):
+        * inspector/front-end/View.js:
+        (WebInspector.View.prototype.childViews):
+
 2011-10-06  Pavel Podivilov  <podivilov@chromium.org>
 
         Web Inspector: saving JavaScript after live edit resets scroller position.
index 0dfb959b1df8eaaa33735258b82416c9a29108da..5860bfdc0ece3c087e72a60042262e9b5aae5f9d 100644 (file)
@@ -171,6 +171,10 @@ WebInspector.ResourcesPanel.prototype = {
 
         if (this.sidebarTree.selectedTreeElement)
             this.sidebarTree.selectedTreeElement.deselect();
+
+        var childViews = this.childViews();
+        for (var i = 0; i < childViews.length; ++i)
+            this.removeChildView(childViews[i]);
     },
 
     _populateResourceTree: function()
index 22292d139cf67cb38fa4197b009f5f493e594739..d70749e4484d7737a26d7b37bc16f353e035eccd 100644 (file)
@@ -155,6 +155,11 @@ WebInspector.View.prototype = {
         view._detach();
     },
 
+    childViews: function()
+    {
+        return this._children.slice();
+    },
+
     onResize: function()
     {
     },