Title: [217087] trunk/Source/WebCore
- Revision
- 217087
- Author
- [email protected]
- Date
- 2017-05-18 19:59:17 -0700 (Thu, 18 May 2017)
Log Message
Web Inspector: Release InjectedScripts when frontends close
https://bugs.webkit.org/show_bug.cgi?id=172313
Patch by Joseph Pecoraro <[email protected]> on 2017-05-18
Reviewed by Andreas Kling.
* inspector/InspectorController.cpp:
(WebCore::InspectorController::disconnectFrontend):
Release inspector resources together, including discarding injected
scripts so that they may be collected.
(WebCore::InspectorController::inspectedPageDestroyed):
(WebCore::InspectorController::disconnectAllFrontends):
Move the disconnect call inside of disconnectAllFrontends to establish
a pattern of releasing web inspector resources together.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (217086 => 217087)
--- trunk/Source/WebCore/ChangeLog 2017-05-19 02:55:15 UTC (rev 217086)
+++ trunk/Source/WebCore/ChangeLog 2017-05-19 02:59:17 UTC (rev 217087)
@@ -1,3 +1,20 @@
+2017-05-18 Joseph Pecoraro <[email protected]>
+
+ Web Inspector: Release InjectedScripts when frontends close
+ https://bugs.webkit.org/show_bug.cgi?id=172313
+
+ Reviewed by Andreas Kling.
+
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::disconnectFrontend):
+ Release inspector resources together, including discarding injected
+ scripts so that they may be collected.
+
+ (WebCore::InspectorController::inspectedPageDestroyed):
+ (WebCore::InspectorController::disconnectAllFrontends):
+ Move the disconnect call inside of disconnectAllFrontends to establish
+ a pattern of releasing web inspector resources together.
+
2017-05-18 Simon Fraser <[email protected]>
Add a newline after the URL in showLayerTree output.
Modified: trunk/Source/WebCore/inspector/InspectorController.cpp (217086 => 217087)
--- trunk/Source/WebCore/inspector/InspectorController.cpp 2017-05-19 02:55:15 UTC (rev 217086)
+++ trunk/Source/WebCore/inspector/InspectorController.cpp 2017-05-19 02:59:17 UTC (rev 217087)
@@ -202,8 +202,6 @@
void InspectorController::inspectedPageDestroyed()
{
- m_injectedScriptManager->disconnect();
-
// Clean up resources and disconnect local and remote frontends.
disconnectAllFrontends();
@@ -283,8 +281,9 @@
// Notify agents first.
m_agents.willDestroyFrontendAndBackend(DisconnectReason::InspectorDestroyed);
- // Destroy the inspector overlay's page.
+ // Clean up inspector resources.
m_overlay->freePage();
+ m_injectedScriptManager->discardInjectedScripts();
// Unplug all instrumentations since they aren't needed now.
InspectorInstrumentation::unregisterInstrumentingAgents(m_instrumentingAgents.get());
@@ -317,8 +316,9 @@
// Notify agents first, since they may need to use InspectorClient.
m_agents.willDestroyFrontendAndBackend(DisconnectReason::InspectedTargetDestroyed);
- // Destroy the inspector overlay's page.
+ // Clean up inspector resources.
m_overlay->freePage();
+ m_injectedScriptManager->disconnect();
// Disconnect any remaining remote frontends.
m_frontendRouter->disconnectAllFrontends();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes