Bug 1121269 - Remove TLS keys from bookkeeping in non-Nuwa processes too. r=thinker
authorMike Hommey <mh+mozilla@glandium.org>
Thu, 15 Jan 2015 08:17:35 +0900
changeset 242218 30cc8c82eb2106e7513e554797e2025f9bced37f
parent 242217 af3cf3f3a89955990376012ad3adb69c962f2b1a
child 242219 f478222a61669bc2a3f6aa3d433bfe85329f038d
push id649
push userwcosta@mozilla.com
push dateWed, 11 Feb 2015 16:57:44 +0000
reviewersthinker
bugs1121269
milestone38.0a1
Bug 1121269 - Remove TLS keys from bookkeeping in non-Nuwa processes too. r=thinker
mozglue/build/Nuwa.cpp
--- a/mozglue/build/Nuwa.cpp
+++ b/mozglue/build/Nuwa.cpp
@@ -760,19 +760,16 @@ extern "C" MFBT_API int
   MOZ_RELEASE_ASSERT(REAL(pthread_mutex_lock)(&sTLSKeyLock) == 0);
   sTLSKeys.insertBack(new TLSKey(*key, destructor));
   MOZ_RELEASE_ASSERT(pthread_mutex_unlock(&sTLSKeyLock) == 0);
   return 0;
 }
 
 extern "C" MFBT_API int
 __wrap_pthread_key_delete(pthread_key_t key) {
-  if (!sIsNuwaProcess) {
-    return REAL(pthread_key_delete)(key);
-  }
   int rv = REAL(pthread_key_delete)(key);
   if (rv != 0) {
     return rv;
   }
   MOZ_RELEASE_ASSERT(REAL(pthread_mutex_lock)(&sTLSKeyLock) == 0);
   for (TLSKey *it = sTLSKeys.getFirst(); it != nullptr; it = it->getNext()) {
     if (key == it->first) {
       delete it;