зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1735129: Add thread's name in nsThread::Shutdown's SpinEventLoopUntil annotation. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D128270
This commit is contained in:
Родитель
cf47bf9cbf
Коммит
edc33dea57
|
@ -855,10 +855,14 @@ nsThread::Shutdown() {
|
||||||
|
|
||||||
NotNull<nsThreadShutdownContext*> context = WrapNotNull(maybeContext);
|
NotNull<nsThreadShutdownContext*> context = WrapNotNull(maybeContext);
|
||||||
|
|
||||||
|
// If we are going to hang here we want to see the thread's name
|
||||||
|
nsAutoCString threadName;
|
||||||
|
GetThreadName(threadName);
|
||||||
|
|
||||||
// Process events on the current thread until we receive a shutdown ACK.
|
// Process events on the current thread until we receive a shutdown ACK.
|
||||||
// Allows waiting; ensure no locks are held that would deadlock us!
|
// Allows waiting; ensure no locks are held that would deadlock us!
|
||||||
SpinEventLoopUntil(
|
SpinEventLoopUntil(
|
||||||
"nsThread::Shutdown"_ns,
|
"nsThread::Shutdown: "_ns + threadName,
|
||||||
[&, context]() { return !context->mAwaitingShutdownAck; },
|
[&, context]() { return !context->mAwaitingShutdownAck; },
|
||||||
context->mJoiningThread);
|
context->mJoiningThread);
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче