Bug 1253094, part 10 - Stop using DebugOnly for class/struct members in memory/. r=njn draft
authorJonathan Watt <jwatt@jwatt.org>
Wed, 02 Mar 2016 23:58:53 +0000
changeset 336261 62674595ac8cdbff258558dbfc0462a8d6ce9227
parent 336260 6c533769d9385920308aa316b8c244baf7b7186f
child 336262 ad10c952167c3b7f2a6dff5c19026720d2affc31
push id12025
push userjwatt@jwatt.org
push dateThu, 03 Mar 2016 00:03:10 +0000
reviewersnjn
bugs1253094
milestone47.0a1
Bug 1253094, part 10 - Stop using DebugOnly for class/struct members in memory/. r=njn MozReview-Commit-ID: 5EIIL3beTLv
memory/replace/dmd/DMD.h
--- a/memory/replace/dmd/DMD.h
+++ b/memory/replace/dmd/DMD.h
@@ -74,27 +74,34 @@ private:
   // Wrapper class keeping a pointer to the DMD functions. It is statically
   // initialized because it needs to be set early enough.
   // Debug builds also check that it's never accessed before the static
   // initialization actually occured, which could be the case if some other
   // static initializer ended up calling into DMD.
   class Singleton
   {
   public:
-    Singleton() : mValue(ReplaceMalloc::GetDMDFuncs()), mInitialized(true) {}
+    Singleton()
+      : mValue(ReplaceMalloc::GetDMDFuncs())
+#ifdef DEBUG
+      , mInitialized(true)
+#endif
+    {}
 
     DMDFuncs* Get()
     {
       MOZ_ASSERT(mInitialized);
       return mValue;
     }
 
   private:
     DMDFuncs* mValue;
-    DebugOnly<bool> mInitialized;
+#ifdef DEBUG
+    bool mInitialized;
+#endif
   };
 
   // This singleton pointer must be defined on the program side. In Gecko,
   // this is done in xpcom/base/nsMemoryInfoDumper.cpp.
   static /* DMDFuncs:: */Singleton sSingleton;
 #endif
 };