Open Bug 1746591 Opened 3 years ago Updated 2 years ago

RuntimeService::Cleanup could better be replaced with an async shutdown blocker

Categories

(Core :: DOM: Workers, task)

task

Tracking

()

People

(Reporter: jstutte, Unassigned)

References

Details

RuntimeService::Cleanup currently spins a self-made event loop during xpcom-shutdown-thread.

We want to use an async shutdown blocker here. If this is not possible, we should at least consider using SpinEventLoopUntil.

See 1805613 comment 46:

Note that if we really want to be able to react on shutdown in a content process, we should observe "content-child-shutdown" or "quit-application-granted" as these are the only notifications that are always fired during shutdown. In particular the entire XPCOM shutdown is not happening in release at all. But I assume we can just omit the cleanup also for workers? Or should we tell the parent that the workers using our process are going away?

See Also: → 1805613

And see bug 1762840 comment 4:

Now "web-workers-shutdown" seems to be triggered by "xpcom-shutdown" but wants probably to be completed before finishing the shutdown. I think this could be handled by making those blockers block "xpcom-will-shutdown" and then doing the RuntimeService shutdown as part of "xpcom-shutdown" as before.

See Also: → 1762840
You need to log in before you can comment on or make changes to this bug.