Closed Bug 1231586 Opened 9 years ago Closed 9 years ago

ServiceWorkerManager singleton is cleared too late during shutdown

Categories

(Core :: DOM: Service Workers, defect)

defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: bkelly, Unassigned)

References

Details

Currently ServiceWorkerManager uses ClearOnShutdown() to drop its singleton reference.  This occurs around "XPCOM Component Shutdown" in this table:

  https://wiki.mozilla.org/XPCOM_Shutdown

Thats pretty late in the process.

The SWM, however, does a bunch of cleanup much earlier at "xpcom-shutdown".

It seems this leaves a window during shutdown where a reference to the SWM can still be found, but the SWM is not in a fully initialized state.

We should either clear the SWM singleton ref at xpcom-shutdown time or check mShuttingDown in GetInstance.
I guess keeping the ref might be necessary for clearing events through shutdown.  Maybe the mShuttingDown variable is the way to handle this.

I'm going to leave this bug open for now, but not actively work on a patch.
Assignee: bkelly → nobody
Status: ASSIGNED → NEW
Yea, mShuttingDown is the way to go.  Sorry for the noise here.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.