Title: [224462] trunk/Source/WebKit
- Revision
- 224462
- Author
- [email protected]
- Date
- 2017-11-04 16:01:56 -0700 (Sat, 04 Nov 2017)
Log Message
REGRESSION(r223718): Leaking WebProcessPool after reconfiguration
https://bugs.webkit.org/show_bug.cgi?id=179123
<rdar://problem/35294685>
Reviewed by Geoff Garen.
Make sure we destroy the ServiceWorker WebProcess once all other WebProcesses
go away at there is no use keeping it running at this point. Also, this prevents
leaking the WebProcessPool since the WebProcessProxy holds a strong reference
to the WebProcessPool.
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::disconnectProcess):
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (224461 => 224462)
--- trunk/Source/WebKit/ChangeLog 2017-11-04 22:02:39 UTC (rev 224461)
+++ trunk/Source/WebKit/ChangeLog 2017-11-04 23:01:56 UTC (rev 224462)
@@ -1,3 +1,19 @@
+2017-11-04 Chris Dumez <[email protected]>
+
+ REGRESSION(r223718): Leaking WebProcessPool after reconfiguration
+ https://bugs.webkit.org/show_bug.cgi?id=179123
+ <rdar://problem/35294685>
+
+ Reviewed by Geoff Garen.
+
+ Make sure we destroy the ServiceWorker WebProcess once all other WebProcesses
+ go away at there is no use keeping it running at this point. Also, this prevents
+ leaking the WebProcessPool since the WebProcessProxy holds a strong reference
+ to the WebProcessPool.
+
+ * UIProcess/WebProcessPool.cpp:
+ (WebKit::WebProcessPool::disconnectProcess):
+
2017-11-01 Darin Adler <[email protected]>
Simplify event dispatch code and make it a bit more consistent
Modified: trunk/Source/WebKit/StorageProcess/StorageProcess.cpp (224461 => 224462)
--- trunk/Source/WebKit/StorageProcess/StorageProcess.cpp 2017-11-04 22:02:39 UTC (rev 224461)
+++ trunk/Source/WebKit/StorageProcess/StorageProcess.cpp 2017-11-04 23:01:56 UTC (rev 224462)
@@ -76,8 +76,16 @@
return true;
}
-void StorageProcess::didClose(IPC::Connection&)
+void StorageProcess::didClose(IPC::Connection& connection)
{
+#if ENABLE(SERVICE_WORKER)
+ if (m_workerContextProcessConnection == &connection) {
+ m_workerContextProcessConnection = nullptr;
+ return;
+ }
+#else
+ UNUSED_PARAM(connection);
+#endif
stopRunLoop();
}
Modified: trunk/Source/WebKit/UIProcess/Storage/StorageProcessProxy.cpp (224461 => 224462)
--- trunk/Source/WebKit/UIProcess/Storage/StorageProcessProxy.cpp 2017-11-04 22:02:39 UTC (rev 224461)
+++ trunk/Source/WebKit/UIProcess/Storage/StorageProcessProxy.cpp 2017-11-04 23:01:56 UTC (rev 224462)
@@ -231,6 +231,7 @@
void StorageProcessProxy::didGetWorkerContextProcessConnection(const IPC::Attachment& connection)
{
+ m_waitingOnWorkerContextProcessConnection = false;
send(Messages::StorageProcess::DidGetWorkerContextProcessConnection(connection), 0);
}
Modified: trunk/Source/WebKit/UIProcess/WebProcessPool.cpp (224461 => 224462)
--- trunk/Source/WebKit/UIProcess/WebProcessPool.cpp 2017-11-04 22:02:39 UTC (rev 224461)
+++ trunk/Source/WebKit/UIProcess/WebProcessPool.cpp 2017-11-04 23:01:56 UTC (rev 224462)
@@ -935,6 +935,15 @@
if (m_processesUsingGamepads.contains(process))
processStoppedUsingGamepads(*process);
#endif
+
+#if ENABLE(SERVICE_WORKER)
+ // FIXME: We should do better than this. For now, we just destroy the ServiceWorker process
+ // whenever there is no regular WebContent process remaining.
+ if (m_processes.size() == 1 && m_processes[0] == m_serviceWorkerProcess) {
+ m_serviceWorkerProcess = nullptr;
+ m_processes.clear();
+ }
+#endif
}
WebProcessProxy& WebProcessPool::createNewWebProcessRespectingProcessCountLimit(WebsiteDataStore& websiteDataStore)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes