Bug 183921 - Use the same SWServer for all ephemeral sessions
Summary: Use the same SWServer for all ephemeral sessions
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Service Workers (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks: 186205
  Show dependency treegraph
 
Reported: 2018-03-22 15:52 PDT by Chris Dumez
Modified: 2018-06-01 16:15 PDT (History)
5 users (show)

See Also:


Attachments
Patch (1.95 KB, patch)
2018-03-22 15:53 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2018-03-22 15:52:19 PDT
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.
Comment 1 Chris Dumez 2018-03-22 15:52:37 PDT
<rdar://problem/36873075>
Comment 2 Chris Dumez 2018-03-22 15:53:58 PDT
Created attachment 336319 [details]
Patch
Comment 3 Brady Eidson 2018-03-22 16:31:30 PDT
Comment on attachment 336319 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=336319&action=review

Not going to r-, but I do have one nit

> Source/WebKit/StorageProcess/StorageProcess.cpp:438
> +    // Use the same SWServer for all ephemeral sessions.
> +    if (sessionID.isEphemeral())
> +        sessionID = PAL::SessionID::legacyPrivateSessionID();

We eventually want legacyPrivateSessionID() to go away.

So it would be nicer if we had some sort of shared "global ephemeral SWServer session ID"

But we can also do that later when we get rid of the legacy one.
Comment 4 WebKit Commit Bot 2018-03-22 17:01:00 PDT
Comment on attachment 336319 [details]
Patch

Clearing flags on attachment: 336319

Committed r229872: <https://trac.webkit.org/changeset/229872>
Comment 5 WebKit Commit Bot 2018-03-22 17:01:01 PDT
All reviewed patches have been landed.  Closing bug.