Ensure that service workers registration related to temporarily installed addons are not persisted across restarts
Categories
(WebExtensions :: General, task, P2)
Tracking
(firefox92 fixed)
Tracking | Status | |
---|---|---|
firefox92 | --- | fixed |
People
(Reporter: rpl, Assigned: rpl)
References
(Blocks 1 open bug)
Details
(Whiteboard: [mv3-m2])
Attachments
(2 files)
As a follow up to Bug 1609920:
once an extension is going to be able to register a service worker (either by declaring a background service worker in the manifest, or by registering it on their own using navigator.serviceWorker.register), we should make sure that the service worker registrations related to a temporarily installed extensions are not persisted across restarts.
Assignee | ||
Updated•5 years ago
|
Updated•3 years ago
|
Assignee | ||
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Assignee | ||
Comment 1•3 years ago
|
||
This patch adds a new temporarilyInstalled
property to the WebExtensionPolicy object, set to
the value of the same property from a Extension.jsm perspective.
The new property is being introduced mainly to be used in a patch that follows to allow the
ServiceWorkerManager internals to access that from the C++ layer (but it may be also
become a useful knowledge for other C++ components in the future).
Assignee | ||
Comment 2•3 years ago
|
||
This patch include a small change to ServiceWorkerManager::StoreRegistration which does early exist
and not store the registration on disk if:
- the principal is from a WebExtension
- the addon is not enabled (or was already uninstalled) by the time we got to store the registration
- the addon is temporarily installed
At the moment it should not happen, but if ServiceWorkerManager::StoreRegistration was reached too late
for some reason and the registration was meant to be stored, the service worker would still be registered
again when the addon is started again on the next browser startup and stored on disk if it was meant to.
Depends on D119529
Assignee | ||
Comment 3•3 years ago
|
||
Moving this issue from milestone 3 to milestone 2.
Comment 5•3 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/c5a37c27cf88
https://hg.mozilla.org/mozilla-central/rev/d25f05325516
Description
•