Bug 1471018 - Speed-up AsmJSCache shutdown by setting the shutdown requested flag; r=asuth
authorJan Varga <jan.varga@gmail.com>
Tue, 14 Aug 2018 08:22:43 +0200
changeset 431390 0f32468900cd607c16a6a3c12dc255f11395a96e
parent 431389 825425be7ba9d2b941ee57f02195c28be5a4bb0f
child 431391 d02af44b96ab6aa513ba7f58701625360c8b501d
push id34440
push userapavel@mozilla.com
push dateTue, 14 Aug 2018 16:15:57 +0000
treeherdermozilla-central@48a45df79f32 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersasuth
bugs1471018
milestone63.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1471018 - Speed-up AsmJSCache shutdown by setting the shutdown requested flag; r=asuth
dom/asmjscache/AsmJSCache.cpp
--- a/dom/asmjscache/AsmJSCache.cpp
+++ b/dom/asmjscache/AsmJSCache.cpp
@@ -1933,16 +1933,19 @@ void
 Client::StopIdleMaintenance()
 {
 }
 
 void
 Client::ShutdownWorkThreads()
 {
   AssertIsOnBackgroundThread();
+  MOZ_ASSERT(!mShutdownRequested);
+
+  mShutdownRequested = true;
 
   if (sLiveParentActors) {
     MOZ_ALWAYS_TRUE(SpinEventLoopUntil([&]() {
       return !sLiveParentActors;
     }));
   }
 }