Bug 766883 - Don't abort during shutdown when SignalTracerThread is called twice before FireAndWaitForTracerEvent notices; r=ted DONTBUILD

CLOSED TREE
This commit is contained in:
Markus Stange 2012-12-21 16:11:24 +00:00
parent 4e06d10e6f
commit 89d149fbcf
2 changed files with 8 additions and 6 deletions

View File

@ -44,9 +44,10 @@ void SignalTracerThread()
if (!sMutex || !sCondVar)
return;
MutexAutoLock lock(*sMutex);
NS_ABORT_IF_FALSE(!sTracerProcessed, "Tracer synchronization state is wrong");
sTracerProcessed = true;
sCondVar->Notify();
if (!sTracerProcessed) {
sTracerProcessed = true;
sCondVar->Notify();
}
}
// This function is called from the background tracer thread.

View File

@ -69,9 +69,10 @@ void SignalTracerThread()
if (!sMutex || !sCondVar)
return;
MutexAutoLock lock(*sMutex);
NS_ABORT_IF_FALSE(!sTracerProcessed, "Tracer synchronization state is wrong");
sTracerProcessed = true;
sCondVar->Notify();
if (!sTracerProcessed) {
sTracerProcessed = true;
sCondVar->Notify();
}
}
} // namespace mozilla