Open Bug 1459946 Opened 6 years ago Updated 2 years ago

Add option to stop a service worker already running

Categories

(DevTools :: Application Panel, enhancement, P3)

61 Branch
enhancement

Tracking

(Not tracked)

People

(Reporter: jdescottes, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [m1.1-reserve])

Similarly to the "start" link currently available for non-running service workers, we should also have a "stop" link for running service workers.
Severity: normal → enhancement
Product: Firefox → DevTools
Priority: -- → P2
Priority: P2 → P3
Priority: P3 → P2
Whiteboard: [m1.1-mvp]
Whiteboard: [m1.1-mvp] → [m1.1-reserve]
Priority: P2 → P3

Copying here a comment from Julian on what needs to be done to surface a stop functionality on the platform:

I think we would need to expose TerminateWorker defined at https://searchfox.org/mozilla-central/rev/55aa17110091deef24b913d033ccaf58f9c6d337/dom/serviceworkers/ServiceWorkerPrivate.cpp#1790 all the way through ServiceWorkerPrivate -> ServiceWorkerInfo -> ServiceWorkerInfo IDL ... and then we would be able to call it from the service-worker-registration actor's activeWorker
the following patch seems to work: https://hg.mozilla.org/try/rev/5fb7dea5a6017d58fa0a440030356827303f3fbe

Perry, we wanted to move this forward for 78/79. Do you agree with :jdescottes approach to terminate running workers: https://hg.mozilla.org/try/rev/5fb7dea5a6017d58fa0a440030356827303f3fbe .

Flags: needinfo?(perry)

Yeah, jdescottes' change looks good to me.

Flags: needinfo?(perry)
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.