Open Bug 1844486 Opened 1 year ago Updated 1 year ago

BackgroundWorker build and shutdown should gracefully handle early interruption

Categories

(WebExtensions :: General, defect, P3)

defect

Tracking

(Not tracked)

People

(Reporter: robwu, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [addons-jira])

The current build/shutdown logic of the background service worker seems to rely on the assumption that shutdown is only called once build has finished. The code doesn't account for early interruptions, which can potentially cause the BackgroundWorker's logic to be stuck waiting for a notification that never arrives:

For comparison, the BackgroundPage implementation does guarantee that shutdown() can be called at any point, and that the result is eventually cleaned up. This is relies upon to support atomic backgroundState transitions in bug 1762225.

Severity: -- → S4
Priority: -- → P3
Whiteboard: [addons-jira]
You need to log in before you can comment on or make changes to this bug.