bug 1321884 - clean up the HeldMutexStack on helper threads r=jonco
authorTrevor Saunders <tbsaunde@tbsaunde.org>
Fri, 02 Dec 2016 15:57:37 -0500
changeset 325433 8ec6d1a356d132809281b8bd227abbfcc3318904
parent 325432 7849f81b44de6f6b1a83545bdd514f0a73f21c5e
child 325434 6106512db4baa60f3ef5909d22a661b2228e8052
push id31054
push usercbook@mozilla.com
push dateFri, 09 Dec 2016 12:32:25 +0000
treeherdermozilla-central@44ab7f53ead5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjonco
bugs1321884
milestone53.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 1321884 - clean up the HeldMutexStack on helper threads r=jonco The HeldMutexStack is cleaned up in JS_ShutDown() on the main thread, but since it is thread local we need to clean it up on other threads where it is used.
js/src/vm/HelperThreads.cpp
--- a/js/src/vm/HelperThreads.cpp
+++ b/js/src/vm/HelperThreads.cpp
@@ -1402,16 +1402,17 @@ HelperThread::ThreadMain(void* arg)
 
     //See bug 1104658.
     //Set the FPU control word to be the same as the main thread's, or math
     //computations on this thread may use incorrect precision rules during
     //Ion compilation.
     FIX_FPU();
 
     static_cast<HelperThread*>(arg)->threadLoop();
+    Mutex::ShutDown();
 }
 
 void
 HelperThread::handleWasmWorkload(AutoLockHelperThreadState& locked)
 {
     MOZ_ASSERT(HelperThreadState().canStartWasmCompile(locked));
     MOZ_ASSERT(idle());