Bug 249550

Summary: Give clients the ability to override the WKPreferences that a ServiceWorker gets
Product: WebKit Reporter: Brady Eidson <beidson>
Component: WebKit Misc.Assignee: Brady Eidson <beidson>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari 16   
Hardware: Unspecified   
OS: Unspecified   

Description Brady Eidson 2022-12-17 20:11:21 PST
Give clients the ability to override the WKPreferences that a ServiceWorker gets

Right now, they either get preferences from the first page in a process pool, or a default set of preferences if the process pool has never had any.

In practice, clients need to control the WKPreferences a ServiceWorker gets - Even if they've never created a WKWebView!

e.g. When an app wakes up to handle a web push message.

New WKWebsiteDataStore SPI will allow specifying "override preferences for a ServiceWorker"
Comment 1 Radar WebKit Bug Importer 2022-12-17 20:29:44 PST
<rdar://problem/103487822>
Comment 2 Brady Eidson 2022-12-17 20:30:52 PST
Pull request: https://github.com/WebKit/WebKit/pull/7823
Comment 3 EWS 2022-12-20 19:21:42 PST
Committed 258175@main (20f6befea658): <https://commits.webkit.org/258175@main>

Reviewed commits have been landed. Closing PR #7823 and removing active labels.