Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upServiceWorker: don't leak service worker managers #26107
Labels
Comments
|
I'd like to try to work on this one Will try to read the spec first and see how we can handle it. |
|
In the initial issue I linked to the lifetime of service workers, and I think it's actually more relevant to link to the lifetime of registrations at https://w3c.github.io/ServiceWorker/#service-worker-registration-lifetime. So it looks to me that if we were to shutdown the manager process for an origin, we would then still need to persists the registrations for that origin. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Follow-up on #26087
So in the PR a
ServiceWorkerManageris created when a worker is first registered for a given origin, see https://github.com/servo/servo/pull/26087/files#diff-55c92a6a5ba7654ce45fe6fc6c63740fR2629We only shut those down when the constellation shuts-down. https://github.com/servo/servo/pull/26087/files#diff-55c92a6a5ba7654ce45fe6fc6c63740fR2792
We could also shut them down earlier, so as to not effectively leak them unless they are actually being useful in some way.
It's not completely clear what the right heuristics for that would be, but the spec offers some guidance: https://w3c.github.io/ServiceWorker/#service-worker-lifetime