Bug 1279293 Comment 181 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

(In reply to Jens Stutte [:jstutte] from comment #180)
> The question is if the `nsThreadShutdown: *` have some common cause/pattern.

I just clicked through some reports, but it seems that many of them do not even contain the thread we are waiting for. This sounds as if our book-keeping of closing threads could fail in some cases?

IIUC the flow, we will unblock only if [`SchedulerGroup::Dispatch(TaskCategory::Other, event.forget());`](https://searchfox.org/mozilla-central/rev/52751d5a3f93409fa0d149f382512364b19ce280/xpcom/threads/nsThread.cpp#432) succeeds such that we will call `nsThread::ShutdownComplete` on the main thread. We do not check the return value here, and there are at least some mallocs on the way to a successful dispatch that could fail. Should we check for successful dispatch here and in case set the `context->mAwaitingShutdownAck` by hand off main-thread?
(In reply to Jens Stutte [:jstutte] from comment #180)
> The question is if the `nsThreadShutdown: *` have some common cause/pattern.

I just clicked through some reports, but it seems that many of them do not even contain the thread we are waiting for. This sounds as if our book-keeping of closing threads could fail in some cases?

IIUC the flow, we will unblock only if [`SchedulerGroup::Dispatch(TaskCategory::Other, event.forget());`](https://searchfox.org/mozilla-central/rev/52751d5a3f93409fa0d149f382512364b19ce280/xpcom/threads/nsThread.cpp#432) succeeds such that we will call `nsThread::ShutdownComplete` on the main thread. We do not check the return value here, and there are at least some mallocs on the way to a successful dispatch that could fail. Should we check for successful dispatch here and in case clear the `context->mAwaitingShutdownAck` by hand off main-thread?

Back to Bug 1279293 Comment 181