Title: [229872] trunk/Source/WebKit
- Revision
- 229872
- Author
- [email protected]
- Date
- 2018-03-22 17:00:55 -0700 (Thu, 22 Mar 2018)
Log Message
Use the same SWServer for all ephemeral sessions
https://bugs.webkit.org/show_bug.cgi?id=183921
<rdar://problem/36873075>
Reviewed by Youenn Fablet.
Use the same SWServer for all ephemeral sessions. SWServers never go away and we create
one per sessionID. When browsing doing private browsing in Safari (and other fetching
favorite icons), the sessionID is ephemeral and keeps changing. This means that we kept
constructing new SWServers that would never go away. Each SWServer has a thread so we
would eventually hit the thread limit for the storage process.
* StorageProcess/StorageProcess.cpp:
(WebKit::StorageProcess::swServerForSession):
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (229871 => 229872)
--- trunk/Source/WebKit/ChangeLog 2018-03-22 23:12:01 UTC (rev 229871)
+++ trunk/Source/WebKit/ChangeLog 2018-03-23 00:00:55 UTC (rev 229872)
@@ -1,3 +1,20 @@
+2018-03-22 Chris Dumez <[email protected]>
+
+ Use the same SWServer for all ephemeral sessions
+ https://bugs.webkit.org/show_bug.cgi?id=183921
+ <rdar://problem/36873075>
+
+ Reviewed by Youenn Fablet.
+
+ Use the same SWServer for all ephemeral sessions. SWServers never go away and we create
+ one per sessionID. When browsing doing private browsing in Safari (and other fetching
+ favorite icons), the sessionID is ephemeral and keeps changing. This means that we kept
+ constructing new SWServers that would never go away. Each SWServer has a thread so we
+ would eventually hit the thread limit for the storage process.
+
+ * StorageProcess/StorageProcess.cpp:
+ (WebKit::StorageProcess::swServerForSession):
+
2018-03-22 Michael Catanzaro <[email protected]>
Unreviewed, fix format string warnings in service worker code
Modified: trunk/Source/WebKit/StorageProcess/StorageProcess.cpp (229871 => 229872)
--- trunk/Source/WebKit/StorageProcess/StorageProcess.cpp 2018-03-22 23:12:01 UTC (rev 229871)
+++ trunk/Source/WebKit/StorageProcess/StorageProcess.cpp 2018-03-23 00:00:55 UTC (rev 229872)
@@ -432,6 +432,11 @@
SWServer& StorageProcess::swServerForSession(PAL::SessionID sessionID)
{
ASSERT(sessionID.isValid());
+
+ // Use the same SWServer for all ephemeral sessions.
+ if (sessionID.isEphemeral())
+ sessionID = PAL::SessionID::legacyPrivateSessionID();
+
auto result = m_swServers.add(sessionID, nullptr);
if (!result.isNewEntry) {
ASSERT(result.iterator->value);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes