mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-14 14:02:47 +00:00
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:
parent
2d19f15a61
commit
71bc9a4a03
@ -365,6 +365,9 @@ nsSocketTransportService::Init()
|
|||||||
if (mInitialized)
|
if (mInitialized)
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
|
||||||
|
if (mShuttingDown)
|
||||||
|
return NS_ERROR_UNEXPECTED;
|
||||||
|
|
||||||
if (!mThreadEvent) {
|
if (!mThreadEvent) {
|
||||||
mThreadEvent = PR_NewPollableEvent();
|
mThreadEvent = PR_NewPollableEvent();
|
||||||
//
|
//
|
||||||
@ -401,6 +404,9 @@ nsSocketTransportService::Shutdown()
|
|||||||
if (!mInitialized)
|
if (!mInitialized)
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
|
||||||
|
if (mShuttingDown)
|
||||||
|
return NS_ERROR_UNEXPECTED;
|
||||||
|
|
||||||
{
|
{
|
||||||
nsAutoLock lock(mLock);
|
nsAutoLock lock(mLock);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user