Complete fix for bug 41433 (assert/crash in DNS for offline-online) We were not destroying the monitor in shutdown. r=bryner.
git-svn-id: svn://10.0.0.236/trunk@74285 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -1202,6 +1202,9 @@ nsDNSService::Shutdown()
|
||||
if (mThread == nsnull) return rv;
|
||||
#endif
|
||||
|
||||
if (!mMonitor) // already shutdown or not init'ed as yet.
|
||||
return rv;
|
||||
|
||||
{
|
||||
nsAutoMonitor mon(mMonitor); // protect mLookups
|
||||
|
||||
@@ -1236,6 +1239,12 @@ nsDNSService::Shutdown()
|
||||
// Have to break the cycle here, otherwise nsDNSService holds onto the thread
|
||||
// and the thread holds onto the nsDNSService via its mRunnable
|
||||
mThread = nsnull;
|
||||
|
||||
if (mMonitor)
|
||||
{
|
||||
nsAutoMonitor::DestroyMonitor(mMonitor);
|
||||
mMonitor = nsnull;
|
||||
}
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user