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:
gagan%netscape.com
2000-07-15 01:47:30 +00:00
parent 0b5670eee7
commit 6a2e29868d

View File

@@ -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;
}