Bug 1471018 - Speed-up AsmJSCache shutdown by setting the shutdown requested flag; r=asuth a=lizzard
authorJan Varga <jan.varga@gmail.com>
Tue, 14 Aug 2018 08:22:43 +0200
changeset 480986 cfe8e60f9e0a1a9987c085f513ae409d5399a99a
parent 480985 13ded90ac6289617c00ca79e1fc7fd62e3865cf4
child 480987 d8ac2a1b5f6c5563796af8b2e79a359c92821b41
push id1757
push userffxbld-merge
push dateFri, 24 Aug 2018 17:02:43 +0000
treeherdermozilla-release@736023aebdb1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersasuth, lizzard
bugs1471018
milestone62.0
Bug 1471018 - Speed-up AsmJSCache shutdown by setting the shutdown requested flag; r=asuth a=lizzard
dom/asmjscache/AsmJSCache.cpp
--- a/dom/asmjscache/AsmJSCache.cpp
+++ b/dom/asmjscache/AsmJSCache.cpp
@@ -1932,16 +1932,19 @@ void
 Client::StopIdleMaintenance()
 {
 }
 
 void
 Client::ShutdownWorkThreads()
 {
   AssertIsOnBackgroundThread();
+  MOZ_ASSERT(!mShutdownRequested);
+
+  mShutdownRequested = true;
 
   if (sLiveParentActors) {
     MOZ_ALWAYS_TRUE(SpinEventLoopUntil([&]() {
       return !sLiveParentActors;
     }));
   }
 }