Bug 1411977 - Part 3: Clear the SingletonThreadHolder _after_ thread shutdowns are finished, not before they are started. r?drno
MozReview-Commit-ID: Hgak51ReEOO
--- a/media/mtransport/nr_socket_prsock.cpp
+++ b/media/mtransport/nr_socket_prsock.cpp
@@ -247,17 +247,17 @@ private:
nsCOMPtr<nsIThread> mParentThread;
nsCOMPtr<nsIThread> mThread;
};
static StaticRefPtr<SingletonThreadHolder> sThread;
static void ClearSingletonOnShutdown()
{
- ClearOnShutdown(&sThread, ShutdownPhase::ShutdownThreads);
+ ClearOnShutdown(&sThread, ShutdownPhase::ShutdownLoaders);
}
#endif
static nsIThread* GetIOThreadAndAddUse_s()
{
// Always runs on STS thread!
#if defined(MOZILLA_INTERNAL_API)
// We need to safely release this on shutdown to avoid leaks