Closed Bug 1645054 Opened 5 years ago Closed 3 years ago

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)

enhancement

Tracking

()

RESOLVED FIXED
112 Branch
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:

  1. Disable interception when the pref is disabled.
  2. 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:

Assignee: nobody → jmarshall
Attachment #9306774 - Attachment description: WIP: Bug 1645054 - Disable/purge service workers when dom.serviceWorkers.enabled is false → WIP: Bug 1645054 - Disable/purge service workers when dom.serviceWorkers.enabled is false r=#dom-worker-reviewers!
Attachment #9306774 - Attachment description: WIP: Bug 1645054 - Disable/purge service workers when dom.serviceWorkers.enabled is false r=#dom-worker-reviewers! → WIP: Bug 1645054 - Disable/purge service workers when dom.serviceWorkers.enabled is false r=dom-worker-reviewers!
Attachment #9306774 - Attachment is obsolete: true
Pushed by jmarshall@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/06c46706c118 Disable/purge service workers when dom.serviceWorkers.enabled is false r=dom-worker-reviewers,necko-reviewers,asuth,webdriver-reviewers,whimboo

Backed out changeset 06c46706c118 (Bug 1645054) for marionette failures.
Backout link
Push with failures <--> Mn
Failure Log

Flags: needinfo?(jmarshall)
Pushed by jmarshall@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/95bc0e834075 Disable/purge service workers when dom.serviceWorkers.enabled is false r=dom-worker-reviewers,necko-reviewers,asuth,webdriver-reviewers,whimboo
Duplicate of this bug: 1696020
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 112 Branch
Flags: needinfo?(jmarshall)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: