Bug 1736385 - Make sure thread is alive in CacheIOThread::ThreadFunc

This commit is contained in:
Kershaw Chang 2023-12-20 21:52:13 +01:00 committed by roytam1
commit 600142110d

View file

@ -417,6 +417,7 @@ void CacheIOThread::ThreadFunc()
threadInternal->SetObserver(this);
mXPCOMThread = xpcomThread.forget().take();
nsCOMPtr<nsIThread> thread = NS_GetCurrentThread();
lock.NotifyAll();
@ -437,7 +438,6 @@ loopStart:
bool processedEvent;
nsresult rv;
do {
nsIThread *thread = mXPCOMThread;
rv = thread->ProcessNextEvent(false, &processedEvent);
MOZ_ASSERT(mBlockingIOWatcher);