зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1345751. P1 - remove the else branch for MediaShutdownManager ensures all media activities are finished before "xpcom-shutdown-threads" starts. r=cpearce
MozReview-Commit-ID: BdNnlHEb1Nk --HG-- extra : rebase_source : c591fe6cf1fbe95fec4459b6129e1aca5b6d7eef extra : source : fa7f0e9676a271da0d7693d4a6a8c63862187fee
This commit is contained in:
Родитель
7c4d3ea96b
Коммит
9a968fa4e3
|
@ -75,15 +75,9 @@ void FileBlockCache::Close()
|
|||
// releasing memory etc! Also note we close mFD in the destructor so
|
||||
// as to not disturb any IO that's currently running.
|
||||
nsCOMPtr<nsIThread> mainThread = do_GetMainThread();
|
||||
if (mainThread) {
|
||||
nsCOMPtr<nsIRunnable> event = new ShutdownThreadEvent(mThread);
|
||||
mainThread->Dispatch(event.forget(), NS_DISPATCH_NORMAL);
|
||||
} else {
|
||||
// we're on Mainthread already, *and* the event queues are already
|
||||
// shut down, so no events should occur - certainly not creations of
|
||||
// new streams.
|
||||
mThread->Shutdown();
|
||||
}
|
||||
MOZ_ASSERT(mainThread);
|
||||
nsCOMPtr<nsIRunnable> event = new ShutdownThreadEvent(mThread);
|
||||
mainThread->Dispatch(event.forget(), NS_DISPATCH_NORMAL);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче