Backed out changeset 450c187cbc1b (bug 1085727)
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Fri, 24 Oct 2014 12:32:03 +0200
changeset 212111 9c552295345fb2e204f63ef5c86fc1acfd5ac1b0
parent 212110 98212d4e6b611489b33617cde4ec8e51bde8f59f
child 212112 1e4b92de7bc5505606aa1b5c65c17366864aaaa7
push id27697
push usercbook@mozilla.com
push dateFri, 24 Oct 2014 13:48:53 +0000
treeherdermozilla-central@de805196bbc4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1085727
milestone36.0a1
backs out450c187cbc1bb6f9b9c92096ef56f63a7d1cafc8
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
Backed out changeset 450c187cbc1b (bug 1085727)
memory/replace/dmd/DMD.cpp
--- a/memory/replace/dmd/DMD.cpp
+++ b/memory/replace/dmd/DMD.cpp
@@ -313,39 +313,63 @@ static Options *gOptions;
 
 class MutexBase
 {
   CRITICAL_SECTION mCS;
 
   DISALLOW_COPY_AND_ASSIGN(MutexBase);
 
 public:
-  MutexBase()  { InitializeCriticalSection(&mCS); }
-  ~MutexBase() { DeleteCriticalSection(&mCS); }
+  MutexBase()
+  {
+    InitializeCriticalSection(&mCS);
+  }
+
+  ~MutexBase()
+  {
+    DeleteCriticalSection(&mCS);
+  }
 
-  void Lock()   { EnterCriticalSection(&mCS); }
-  void Unlock() { LeaveCriticalSection(&mCS); }
+  void Lock()
+  {
+    EnterCriticalSection(&mCS);
+  }
+
+  void Unlock()
+  {
+    LeaveCriticalSection(&mCS);
+  }
 };
 
 #else
 
 #include <pthread.h>
 #include <sys/types.h>
 
 class MutexBase
 {
   pthread_mutex_t mMutex;
 
   DISALLOW_COPY_AND_ASSIGN(MutexBase);
 
 public:
-  MutexBase() { pthread_mutex_init(&mMutex, nullptr); }
+  MutexBase()
+  {
+    pthread_mutex_init(&mMutex, nullptr);
+  }
 
-  void Lock()   { pthread_mutex_lock(&mMutex); }
-  void Unlock() { pthread_mutex_unlock(&mMutex); }
+  void Lock()
+  {
+    pthread_mutex_lock(&mMutex);
+  }
+
+  void Unlock()
+  {
+    pthread_mutex_unlock(&mMutex);
+  }
 };
 
 #endif
 
 class Mutex : private MutexBase
 {
   bool mIsLocked;
 
@@ -365,39 +389,54 @@ public:
 
   void Unlock()
   {
     MOZ_ASSERT(mIsLocked);
     mIsLocked = false;
     MutexBase::Unlock();
   }
 
-  bool IsLocked() { return mIsLocked; }
+  bool IsLocked()
+  {
+    return mIsLocked;
+  }
 };
 
 // This lock must be held while manipulating global state, such as
 // gStackTraceTable, gBlockTable, etc.
 static Mutex* gStateLock = nullptr;
 
 class AutoLockState
 {
   DISALLOW_COPY_AND_ASSIGN(AutoLockState);
 
 public:
-  AutoLockState()  { gStateLock->Lock(); }
-  ~AutoLockState() { gStateLock->Unlock(); }
+  AutoLockState()
+  {
+    gStateLock->Lock();
+  }
+  ~AutoLockState()
+  {
+    gStateLock->Unlock();
+  }
 };
 
 class AutoUnlockState
 {
   DISALLOW_COPY_AND_ASSIGN(AutoUnlockState);
 
 public:
-  AutoUnlockState()  { gStateLock->Unlock(); }
-  ~AutoUnlockState() { gStateLock->Lock(); }
+  AutoUnlockState()
+  {
+    gStateLock->Unlock();
+  }
+  ~AutoUnlockState()
+  {
+    gStateLock->Lock();
+  }
 };
 
 //---------------------------------------------------------------------------
 // Thread-local storage and blocking of intercepts
 //---------------------------------------------------------------------------
 
 #ifdef XP_WIN
 
@@ -450,17 +489,20 @@ public:
   }
 
   bool UnblockIntercepts()
   {
     MOZ_ASSERT(mBlockIntercepts);
     return mBlockIntercepts = false;
   }
 
-  bool InterceptsAreBlocked() const { return mBlockIntercepts; }
+  bool InterceptsAreBlocked() const
+  {
+    return mBlockIntercepts;
+  }
 };
 
 /* static */ Thread*
 Thread::Fetch()
 {
   Thread* t = static_cast<Thread*>(DMD_GET_TLS_DATA(gTlsIndex));
 
   if (MOZ_UNLIKELY(!t)) {
@@ -496,17 +538,20 @@ public:
 
 //---------------------------------------------------------------------------
 // Location service
 //---------------------------------------------------------------------------
 
 class StringTable
 {
 public:
-  StringTable() { (void)mSet.init(64); }
+  StringTable()
+  {
+    (void)mSet.init(64);
+  }
 
   const char*
   Intern(const char* aString)
   {
     StringHashSet::AddPtr p = mSet.lookupForAdd(aString);
     if (p) {
       return *p;
     }
@@ -548,21 +593,23 @@ private:
   typedef js::HashSet<const char*, StringHasher, InfallibleAllocPolicy> StringHashSet;
 
   StringHashSet mSet;
 };
 
 class StringAlloc
 {
 public:
-  static char* copy(const char* aString)
+  static char*
+  copy(const char* aString)
   {
     return InfallibleAllocPolicy::strdup_(aString);
   }
-  static void free(char* aString)
+  static void
+  free(char* aString)
   {
     InfallibleAllocPolicy::free_(aString);
   }
 };
 
 struct DescribeCodeAddressLock
 {
   static void Unlock() { gStateLock->Unlock(); }