Bug 386614 Crash [@ nsSocketTransportService::Shutdown] when toggling offline/online in 2 frames

guarding against reentrancy from thread shutdown processing events waiting for thread join.
r=biesi sr=biesi
This commit is contained in:
timeless@mozdev.org 2007-07-04 12:33:57 -07:00
parent 3caed131ce
commit e427f99df5

View File

@ -365,6 +365,9 @@ nsSocketTransportService::Init()
if (mInitialized)
return NS_OK;
if (mShuttingDown)
return NS_ERROR_UNEXPECTED;
if (!mThreadEvent) {
mThreadEvent = PR_NewPollableEvent();
//
@ -401,6 +404,9 @@ nsSocketTransportService::Shutdown()
if (!mInitialized)
return NS_OK;
if (mShuttingDown)
return NS_ERROR_UNEXPECTED;
{
nsAutoLock lock(mLock);