diff --git a/mozilla/xpcom/threads/nsThread.cpp b/mozilla/xpcom/threads/nsThread.cpp index 64a10fa5a52..ca4d8475a93 100644 --- a/mozilla/xpcom/threads/nsThread.cpp +++ b/mozilla/xpcom/threads/nsThread.cpp @@ -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);