Bug 183921

Summary: Use the same SWServer for all ephemeral sessions
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: Service WorkersAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: beidson, commit-queue, rniwa, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 186205    
Attachments:
Description Flags
Patch none

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.