Open Bug 1760855 Opened 3 years ago Updated 1 year ago

Move nsIAsyncShutdownService to non JS implementation

Categories

(Core :: IPC, enhancement)

enhancement

Tracking

()

People

(Reporter: gerard-majax, Unassigned)

References

(Blocks 1 open bug)

Details

No description provided.
Summary: Move nsIAsyncShutdownService to non JS implem → Move nsIAsyncShutdownService to non JS implementation

Collecting some more reasons and related efforts.

Bug 1697745 and in particular bug 1762840 want to streamline the current misalignment between shutdown phases and async shutdown observer notifications. This is currently possible only for shutdown phases the JS async shutdown blocker can actually handle, up to XPCOMShutdown.

Bug 1768990 wanted to explore how to make it easy to have a sound lifecycle management on shutdown for XPCOM singletons but got immediately blocked on 1796566. That bug was still trying to build on the existing JS code.

Probably the better approach is to:

  • have a core, C++ async shutdown blocker manager
  • have a JS wrapper around that which resembles the current JS interface of nsIAsyncShutdown (minus some adjustments in the spirit of bug 1762840)
  • make use of the C++ variant for bug 1768990 (XPCOM Singleton lifecycle management)

D172532 from bug 1775784 is another example of workarounds needed because we do not have this.

You need to log in before you can comment on or make changes to this bug.