When dom.serviceWorkers.enabled is false, interception should be disabled and existing registrations should be purged on startup
Categories
(Core :: DOM: Service Workers, enhancement, P2)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox112 | --- | fixed |
People
(Reporter: asuth, Assigned: joshuacmarshall)
References
Details
Attachments
(1 file, 1 obsolete file)
As pointed out in https://bugzilla.mozilla.org/show_bug.cgi?id=1641012#c12 the dom.serviceWorkers.enabled preference doesn't actually prevent interception by already-installed ServiceWorkers.
I think it's likely appropriate to take the 2 following actions in general when the preference is disabled:
- Disable interception when the pref is disabled.
- Purge existing registrations on startup if the preference is disabled.
This would allow use of the preference at runtime to do quick A/B testing with/without ServiceWorkers, and then help ensure cleanup of existing ServiceWorkers if someone restarts Firefox.
Purging the registrations is also consistent with what we're doing as we introduce WebExtension manifest v3 ServiceWorker support, and in fact we can build on the logic and tests added by those cases:
- https://phabricator.services.mozilla.com/D60244 adds a
if (!StaticPrefs::extensions_backgroundServiceWorker_enabled_AtStartup()) {check in ServiceWorkerManager::LoadRegistration - https://phabricator.services.mozilla.com/D73326 adds a marionette test that verifies that the preference actually works.
| Assignee | ||
Updated•3 years ago
|
| Assignee | ||
Comment 1•3 years ago
|
||
Updated•3 years ago
|
Updated•3 years ago
|
| Assignee | ||
Comment 2•3 years ago
|
||
Updated•3 years ago
|
Comment 4•3 years ago
|
||
Backed out changeset 06c46706c118 (Bug 1645054) for marionette failures.
Backout link
Push with failures <--> Mn
Failure Log
Comment 7•3 years ago
|
||
| bugherder | ||
| Assignee | ||
Updated•3 years ago
|
Description
•