Closed Bug 1596934 Opened 5 years ago Closed 5 years ago

Fix attaching to inactive service workers

Categories

(DevTools :: Application Panel, defect)

defect
Not set
normal

Tracking

(firefox73 fixed)

RESOLVED FIXED
Firefox 73
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.

Tentatively moving this to the Application panel component for triage there since, I think, we have the same problem over there.

Component: Framework → Application Panel

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?

Flags: needinfo?(perry)
Pushed by bhackett@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7e25ff4e9bf2
Fix attaching to inactive service workers, r=jdescottes.

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.

Flags: needinfo?(perry)
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 73
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: