Title: [184108] trunk/Source/WebInspectorUI
Revision
184108
Author
[email protected]
Date
2015-05-11 10:50:25 -0700 (Mon, 11 May 2015)

Log Message

Web Inspector: NavigationSidebarPanel leaks some event listeners
https://bugs.webkit.org/show_bug.cgi?id=144523

Reviewed by Joseph Pecoraro.

* UserInterface/Views/NavigationSidebarPanel.js:
(WebInspector.NavigationSidebarPanel):
(WebInspector.NavigationSidebarPanel.prototype.closed):
* UserInterface/Views/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype.closed):
* UserInterface/Views/SearchSidebarPanel.js:
(WebInspector.SearchSidebarPanel.prototype.closed):
* UserInterface/Views/StorageSidebarPanel.js:
(WebInspector.StorageSidebarPanel.prototype.closed):
* UserInterface/Views/TimelineSidebarPanel.js:
(WebInspector.TimelineSidebarPanel.prototype.closed):

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (184107 => 184108)


--- trunk/Source/WebInspectorUI/ChangeLog	2015-05-11 17:47:55 UTC (rev 184107)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-05-11 17:50:25 UTC (rev 184108)
@@ -1,3 +1,22 @@
+2015-05-11  Timothy Hatcher  <[email protected]>
+
+        Web Inspector: NavigationSidebarPanel leaks some event listeners
+        https://bugs.webkit.org/show_bug.cgi?id=144523
+
+        Reviewed by Joseph Pecoraro.
+
+        * UserInterface/Views/NavigationSidebarPanel.js:
+        (WebInspector.NavigationSidebarPanel):
+        (WebInspector.NavigationSidebarPanel.prototype.closed):
+        * UserInterface/Views/ResourceSidebarPanel.js:
+        (WebInspector.ResourceSidebarPanel.prototype.closed):
+        * UserInterface/Views/SearchSidebarPanel.js:
+        (WebInspector.SearchSidebarPanel.prototype.closed):
+        * UserInterface/Views/StorageSidebarPanel.js:
+        (WebInspector.StorageSidebarPanel.prototype.closed):
+        * UserInterface/Views/TimelineSidebarPanel.js:
+        (WebInspector.TimelineSidebarPanel.prototype.closed):
+
 2015-05-10  Nikita Vasilyev  <[email protected]>
 
         Web Inspector: In the console, show function name next to the source link

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/NavigationSidebarPanel.js (184107 => 184108)


--- trunk/Source/WebInspectorUI/UserInterface/Views/NavigationSidebarPanel.js	2015-05-11 17:47:55 UTC (rev 184107)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/NavigationSidebarPanel.js	2015-05-11 17:50:25 UTC (rev 184108)
@@ -52,7 +52,8 @@
             this.element.appendChild(this._topOverflowShadowElement);
         }
 
-        window.addEventListener("resize", this._updateContentOverflowShadowVisibility.bind(this));
+        this._boundUpdateContentOverflowShadowVisibility = this._updateContentOverflowShadowVisibility.bind(this);
+        window.addEventListener("resize", this._boundUpdateContentOverflowShadowVisibility);
 
         this._filtersSetting = new WebInspector.Setting(identifier + "-navigation-sidebar-filters", {});
         this._filterBar.filters = this._filtersSetting.value;
@@ -76,6 +77,12 @@
 
     // Public
 
+    closed()
+    {
+        window.removeEventListener("resize", this._boundUpdateContentOverflowShadowVisibility);
+        WebInspector.Frame.removeEventListener(null, null, this);
+    }
+
     get contentBrowser()
     {
         return this._contentBrowser;

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ResourceSidebarPanel.js (184107 => 184108)


--- trunk/Source/WebInspectorUI/UserInterface/Views/ResourceSidebarPanel.js	2015-05-11 17:47:55 UTC (rev 184107)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ResourceSidebarPanel.js	2015-05-11 17:50:25 UTC (rev 184108)
@@ -56,6 +56,8 @@
 
     closed()
     {
+        super.closed();
+
         WebInspector.Frame.removeEventListener(null, null, this);
         WebInspector.frameResourceManager.removeEventListener(null, null, this);
         WebInspector.debuggerManager.removeEventListener(null, null, this);

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/SearchSidebarPanel.js (184107 => 184108)


--- trunk/Source/WebInspectorUI/UserInterface/Views/SearchSidebarPanel.js	2015-05-11 17:47:55 UTC (rev 184107)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/SearchSidebarPanel.js	2015-05-11 17:50:25 UTC (rev 184108)
@@ -64,6 +64,8 @@
 
     closed()
     {
+        super.closed();
+
         WebInspector.Frame.removeEventListener(null, null, this);
     }
 

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/StorageSidebarPanel.js (184107 => 184108)


--- trunk/Source/WebInspectorUI/UserInterface/Views/StorageSidebarPanel.js	2015-05-11 17:47:55 UTC (rev 184107)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/StorageSidebarPanel.js	2015-05-11 17:50:25 UTC (rev 184108)
@@ -85,6 +85,8 @@
 
     closed()
     {
+        super.closed();
+
         WebInspector.storageManager.removeEventListener(null, null, this);
         WebInspector.applicationCacheManager.removeEventListener(null, null, this);
     }

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TimelineSidebarPanel.js (184107 => 184108)


--- trunk/Source/WebInspectorUI/UserInterface/Views/TimelineSidebarPanel.js	2015-05-11 17:47:55 UTC (rev 184107)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TimelineSidebarPanel.js	2015-05-11 17:50:25 UTC (rev 184108)
@@ -172,6 +172,8 @@
 
     closed()
     {
+        super.closed();
+
         WebInspector.showReplayInterfaceSetting.removeEventListener(null, null, this);
         WebInspector.replayManager.removeEventListener(null, null, this);
         WebInspector.timelineManager.removeEventListener(null, null, this);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to