Title: [187115] trunk/Source/WebKit2
Revision
187115
Author
akl...@apple.com
Date
2015-07-21 12:54:23 -0700 (Tue, 21 Jul 2015)

Log Message

API::Session should clean up its storage in the network process when destroyed.
<https://webkit.org/b/147139>
<rdar://problem/21838764>

Reviewed by Anders Carlsson.

Have ~Session() send a DestroyPrivateBrowsingSession message to all networking processes
for ephemeral sessions. This plugs a NetworkStorageSession leak that could retain a large
CFNetwork object graph.

* UIProcess/API/APISession.cpp:
(API::Session::~Session):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (187114 => 187115)


--- trunk/Source/WebKit2/ChangeLog	2015-07-21 19:52:29 UTC (rev 187114)
+++ trunk/Source/WebKit2/ChangeLog	2015-07-21 19:54:23 UTC (rev 187115)
@@ -1,3 +1,18 @@
+2015-07-21  Andreas Kling  <akl...@apple.com>
+
+        API::Session should clean up its storage in the network process when destroyed.
+        <https://webkit.org/b/147139>
+        <rdar://problem/21838764>
+
+        Reviewed by Anders Carlsson.
+
+        Have ~Session() send a DestroyPrivateBrowsingSession message to all networking processes
+        for ephemeral sessions. This plugs a NetworkStorageSession leak that could retain a large
+        CFNetwork object graph.
+
+        * UIProcess/API/APISession.cpp:
+        (API::Session::~Session):
+
 2015-07-21  Sungmann Cho  <sungmann....@navercorp.com>
 
         Make PluginProxy::handleMouseEvent() asynchronous.

Modified: trunk/Source/WebKit2/UIProcess/API/APISession.cpp (187114 => 187115)


--- trunk/Source/WebKit2/UIProcess/API/APISession.cpp	2015-07-21 19:52:29 UTC (rev 187114)
+++ trunk/Source/WebKit2/UIProcess/API/APISession.cpp	2015-07-21 19:54:23 UTC (rev 187115)
@@ -28,6 +28,11 @@
 
 #include <wtf/RunLoop.h>
 
+#if ENABLE(NETWORK_PROCESS)
+#include "NetworkProcessMessages.h"
+#include "WebProcessPool.h"
+#endif
+
 namespace API {
 
 static uint64_t generateID()
@@ -75,6 +80,12 @@
 
 Session::~Session()
 {
+#if ENABLE(NETWORK_PROCESS)
+    if (m_sessionID.isEphemeral()) {
+        for (auto& processPool : WebKit::WebProcessPool::allProcessPools())
+            processPool->sendToNetworkingProcess(Messages::NetworkProcess::DestroyPrivateBrowsingSession(m_sessionID));
+    }
+#endif
 }
 
 } // namespace API
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to