Bug 1253094, part 10 - Stop using DebugOnly for class/struct members in memory/. r=njn
MozReview-Commit-ID: 5EIIL3beTLv
--- 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
};