Bug 1442404: Don't spin STS when shutting down the mtransport thread. r?drno draft
authorByron Campen [:bwc] <docfaraday@gmail.com>
Tue, 06 Mar 2018 12:30:16 -0600
changeset 763768 a66b5edc9f4ac6c4d5b1c7e281cc6fdb409adc5c
parent 760371 b184be59874080e96903183176c0f88dcbfafe25
push id101563
push userbcampen@mozilla.com
push dateTue, 06 Mar 2018 18:32:04 +0000
reviewersdrno
bugs1442404
milestone60.0a1
Bug 1442404: Don't spin STS when shutting down the mtransport thread. r?drno MozReview-Commit-ID: 47BImEsl9xi
media/mtransport/nr_socket_prsock.cpp
--- a/media/mtransport/nr_socket_prsock.cpp
+++ b/media/mtransport/nr_socket_prsock.cpp
@@ -228,17 +228,17 @@ public:
   {
     MOZ_ASSERT(mParentThread == NS_GetCurrentThread());
     nsrefcnt count = --mUseCount;
     MOZ_ASSERT(int32_t(mUseCount) >= 0, "illegal refcnt");
     if (mThread && count == 0) {
       // in-use -> idle -- no one forcing it to remain instantiated
       r_log(LOG_GENERIC,LOG_DEBUG,"Shutting down wrapped SingletonThread %p",
             mThread.get());
-      mThread->Shutdown();
+      mThread->AsyncShutdown();
       mThread = nullptr;
       // It'd be nice to use a timer instead...  But be careful of
       // xpcom-shutdown-threads in that case
     }
     r_log(LOG_GENERIC,LOG_DEBUG,"ReleaseUse_i: %lu", (unsigned long) count);
   }
 
 private: