Skip to content
Permalink
Browse files
Web Inspector: Views should explicitly remove event listeners from ma…
…nagers/Frame

https://bugs.webkit.org/show_bug.cgi?id=175951

Patch by Ross Kirsling <ross.kirsling@sony.com> on 2017-10-10
Reviewed by Brian Burg.

* UserInterface/Views/ApplicationCacheDetailsSidebarPanel.js:
(WI.ApplicationCacheDetailsSidebarPanel.prototype.closed):
* UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
(WI.DOMNodeDetailsSidebarPanel.prototype.closed):
* UserInterface/Views/DebuggerDashboardView.js:
(WI.DebuggerDashboardView.prototype.closed):
* UserInterface/Views/LogContentView.js:
(WI.LogContentView.prototype.closed):
* UserInterface/Views/NetworkGridContentView.js:
(WI.NetworkGridContentView.prototype.closed):
* UserInterface/Views/ProbeDetailsSidebarPanel.js:
(WI.ProbeDetailsSidebarPanel.prototype.closed):
* UserInterface/Views/QuickConsole.js:
(WI.QuickConsole.prototype.closed):
* UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
(WI.ScopeChainDetailsSidebarPanel.prototype.closed):
* UserInterface/Views/TimelineOverview.js:
(WI.TimelineOverview.prototype.closed):

Canonical link: https://commits.webkit.org/194380@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223137 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
rkirsling authored and webkit-commit-queue committed Oct 10, 2017
1 parent 977bc05 commit a2d06659274c742894cccd8beb5e8d8a21382acf
Showing 10 changed files with 94 additions and 0 deletions.
@@ -1,3 +1,29 @@
2017-10-10 Ross Kirsling <ross.kirsling@sony.com>

Web Inspector: Views should explicitly remove event listeners from managers/Frame
https://bugs.webkit.org/show_bug.cgi?id=175951

Reviewed by Brian Burg.

* UserInterface/Views/ApplicationCacheDetailsSidebarPanel.js:
(WI.ApplicationCacheDetailsSidebarPanel.prototype.closed):
* UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
(WI.DOMNodeDetailsSidebarPanel.prototype.closed):
* UserInterface/Views/DebuggerDashboardView.js:
(WI.DebuggerDashboardView.prototype.closed):
* UserInterface/Views/LogContentView.js:
(WI.LogContentView.prototype.closed):
* UserInterface/Views/NetworkGridContentView.js:
(WI.NetworkGridContentView.prototype.closed):
* UserInterface/Views/ProbeDetailsSidebarPanel.js:
(WI.ProbeDetailsSidebarPanel.prototype.closed):
* UserInterface/Views/QuickConsole.js:
(WI.QuickConsole.prototype.closed):
* UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
(WI.ScopeChainDetailsSidebarPanel.prototype.closed):
* UserInterface/Views/TimelineOverview.js:
(WI.TimelineOverview.prototype.closed):

2017-10-09 Joseph Pecoraro <pecoraro@apple.com>

Web Inspector: Network Tab - Include remote address in the Headers view
@@ -72,6 +72,13 @@ WI.ApplicationCacheDetailsSidebarPanel = class ApplicationCacheDetailsSidebarPan
this.needsLayout();
}

closed()
{
WI.applicationCacheManager.removeEventListener(null, null, this);

super.closed();
}

// Protected

initialLayout()
@@ -38,6 +38,13 @@ WI.DOMNodeDetailsSidebarPanel = class DOMNodeDetailsSidebarPanel extends WI.DOMD

// Public

closed()
{
WI.domTreeManager.removeEventListener(null, null, this);

super.closed();
}

addEventListeners()
{
this.domNode.addEventListener(WI.DOMNode.Event.EventListenersChanged, this._eventListenersChanged, this);
@@ -56,6 +56,15 @@ WI.DebuggerDashboardView = class DebuggerDashboardView extends WI.DashboardView
this._rebuildLocation();
}

// Public

closed()
{
WI.debuggerManager.removeEventListener(null, null, this);

super.closed();
}

// Private

_rebuildLocation()
@@ -142,6 +142,14 @@ WI.LogContentView = class LogContentView extends WI.ContentView
this._logViewController.renderPendingMessages();
}

closed()
{
WI.logManager.removeEventListener(null, null, this);
WI.Frame.removeEventListener(null, null, this);

super.closed();
}

didAppendConsoleMessageView(messageView)
{
console.assert(messageView instanceof WI.ConsoleMessageView || messageView instanceof WI.ConsoleCommandView);
@@ -209,6 +209,8 @@ WI.NetworkGridContentView = class NetworkGridContentView extends WI.ContentView
super.closed();

this._dataGrid.closed();

WI.Frame.removeEventListener(null, null, this);
}

reset()
@@ -84,6 +84,13 @@ WI.ProbeDetailsSidebarPanel = class ProbeDetailsSidebarPanel extends WI.DetailsS
return !!this._inspectedProbeSets.length;
}

closed()
{
WI.probeManager.removeEventListener(null, null, this);

super.closed();
}

// Protected

initialLayout()
@@ -98,6 +98,18 @@ WI.QuickConsole = class QuickConsole extends WI.View
WI.runtimeManager.activeExecutionContext = executionContext;
}

closed()
{
WI.Frame.removeEventListener(null, null, this);
WI.debuggerManager.removeEventListener(null, null, this);
WI.runtimeManager.removeEventListener(null, null, this);
WI.targetManager.removeEventListener(null, null, this);
WI.consoleDrawer.removeEventListener(null, null, this);
WI.TabBrowser.removeEventListener(null, null, this);

super.closed();
}

// Protected

layout()
@@ -111,6 +111,15 @@ WI.ScopeChainDetailsSidebarPanel = class ScopeChainDetailsSidebarPanel extends W
this.needsLayout();
}

closed()
{
WI.runtimeManager.removeEventListener(null, null, this);
WI.Frame.removeEventListener(null, null, this);
WI.debuggerManager.removeEventListener(null, null, this);

super.closed();
}

// Protected

layout()
@@ -362,6 +362,13 @@ WI.TimelineOverview = class TimelineOverview extends WI.View
overviewGraph.hidden();
}

closed()
{
WI.timelineManager.removeEventListener(null, null, this);

super.closed();
}

reset()
{
for (let overviewGraph of this._overviewGraphsByTypeMap.values())

0 comments on commit a2d0665

Please sign in to comment.