Fix attaching to inactive service workers
Categories
(DevTools :: Application Panel, defect)
Tracking
(firefox73 fixed)
Tracking | Status | |
---|---|---|
firefox73 | --- | fixed |
People
(Reporter: bhackett1024, Assigned: bhackett1024)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
Attaching to an inactive service worker does not work correctly, because WorkerTargetFront's logic for preventing worker shutdown only deals with active service workers. The attached patch fixes this but does not prevent shutdown for inactive (i.e. installing or waiting) service workers. I'm not sure if preventing shutdown is necessary for installing or waiting workers. In the installing case, the worker seems to continue to run as long as the install hook hasn't finished (even if the registration has been unregistered). I haven't been able to test the waiting case because of bug 1596933.
Assignee | ||
Comment 1•5 years ago
|
||
Comment 2•5 years ago
|
||
Tentatively moving this to the Application panel component for triage there since, I think, we have the same problem over there.
Comment 3•5 years ago
|
||
I'm not sure if preventing shutdown is necessary for installing or waiting workers. In the installing case, the worker seems to continue to run as long as the install hook hasn't finished (even if the registration has been unregistered). I haven't been able to test the waiting case because of bug 1596933.
Maybe Perry would know? Should we preventShutdown for waiting/installing workers when we want to debug them?
Pushed by bhackett@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7e25ff4e9bf2 Fix attaching to inactive service workers, r=jdescottes.
Comment 5•5 years ago
|
||
If I understand correctly, I don't think waiting/installing workers need preventShutdown to debug them. Right, the installing workers will continue to run as long as the "install" handler hasn't finished (and if the handler is finished, installing workers won't run any more code while in the installing state). Waiting workers don't execute any code at all I believe (they just wait to become active workers), so it doesn't make sense to me to debug them.
Comment 6•5 years ago
|
||
bugherder |
Description
•