Bug 249550 - Give clients the ability to override the WKPreferences that a ServiceWorker gets
Summary: Give clients the ability to override the WKPreferences that a ServiceWorker gets
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: Safari 16
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Brady Eidson
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-12-17 20:11 PST by Brady Eidson
Modified: 2022-12-20 19:21 PST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.