Open Bug 1760855 Opened 2 years ago Updated 8 days ago

Move nsIAsyncShutdownService to non JS implementation

Categories

(Core :: XPCOM, 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)
Blocks: 1768990
See Also: → 1697745, 1762840, 1796566

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

See Also: → 1775784

At least the core C++ part would probably live in XPCOM, so let's move it there for now.

Component: IPC → XPCOM
You need to log in before you can comment on or make changes to this bug.