RuntimeService::Cleanup could better be replaced with an async shutdown blocker
Categories
(Core :: DOM: Workers, 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.
| Reporter | ||
Comment 1•2 years ago
|
||
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?
| Reporter | ||
Comment 2•2 years ago
|
||
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 theRuntimeServiceshutdown as part of"xpcom-shutdown"as before.
Description
•