Bug 1411977 - Part 3: Clear the SingletonThreadHolder _after_ thread shutdowns are finished, not before they are started. r?drno draft
authorByron Campen [:bwc] <docfaraday@gmail.com>
Thu, 25 Jan 2018 09:54:07 -0600
changeset 748501 4780c1c84e8e99b7a882cd952d56eda48f31b5a1
parent 748500 1948b816257188f5c71d8b9a44a6aad2aa8c6a57
child 748502 5e85c43884ed35648af92b08128ff6078099b083
push id97190
push userbcampen@mozilla.com
push dateMon, 29 Jan 2018 22:41:18 +0000
reviewersdrno
bugs1411977
milestone60.0a1
Bug 1411977 - Part 3: Clear the SingletonThreadHolder _after_ thread shutdowns are finished, not before they are started. r?drno MozReview-Commit-ID: Hgak51ReEOO
media/mtransport/nr_socket_prsock.cpp
--- 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