зеркало из https://github.com/mozilla/gecko-dev.git
bug 59526
sr=waterson r=valeski This bullet-proofs the code so the one thread does not exit twice.
This commit is contained in:
Родитель
dce5c20139
Коммит
b1aacc0ff8
|
@ -101,6 +101,12 @@ nsThread::Exit(void* arg)
|
|||
{
|
||||
nsThread* self = (nsThread*)arg;
|
||||
self->mDead = PR_TRUE;
|
||||
|
||||
if (self->mDead) {
|
||||
NS_ERROR("attempt to Exit() thread twice");
|
||||
return;
|
||||
}
|
||||
|
||||
PR_LOG(nsIThreadLog, PR_LOG_DEBUG,
|
||||
("nsIThread %p exited\n", self));
|
||||
NS_RELEASE(self);
|
||||
|
|
Загрузка…
Ссылка в новой задаче