Bug 1253094, part 9 - Stop using DebugOnly for class/struct members in xpcom/. r=froydnj

MozReview-Commit-ID: ACYMR37DGU9
This commit is contained in:
Jonathan Watt 2016-02-26 15:52:08 +00:00
parent 682b1373b2
commit 6691a673f4
2 changed files with 13 additions and 3 deletions

View File

@ -1275,7 +1275,9 @@ private:
nsAutoPtr<CCGraphBuilder> mBuilder;
RefPtr<nsCycleCollectorLogger> mLogger;
DebugOnly<void*> mThread;
#ifdef DEBUG
void* mThread;
#endif
nsCycleCollectorParams mParams;
@ -3402,7 +3404,9 @@ nsCycleCollector::nsCycleCollector() :
mScanInProgress(false),
mJSRuntime(nullptr),
mIncrementalPhase(IdlePhase),
#ifdef DEBUG
mThread(NS_GetCurrentThread()),
#endif
mWhiteNodeCount(0),
mBeforeUnlinkCB(nullptr),
mForgetSkippableCB(nullptr),
@ -4025,11 +4029,13 @@ nsCycleCollector_suspectedCount()
bool
nsCycleCollector_init()
{
static DebugOnly<bool> sInitialized;
#ifdef DEBUG
static bool sInitialized;
MOZ_ASSERT(NS_IsMainThread(), "Wrong thread!");
MOZ_ASSERT(!sInitialized, "Called twice!?");
sInitialized = true;
#endif
return sCollectorData.init();
}

View File

@ -222,7 +222,9 @@ doGCCCDump(const nsCString& aInputStr)
bool
SetupFifo()
{
static DebugOnly<bool> fifoCallbacksRegistered = false;
#ifdef DEBUG
static bool fifoCallbacksRegistered = false;
#endif
if (!FifoWatcher::MaybeCreate()) {
return false;
@ -243,7 +245,9 @@ SetupFifo()
fw->RegisterCallback(NS_LITERAL_CSTRING("abbreviated gc log"),
doGCCCDump);
#ifdef DEBUG
fifoCallbacksRegistered = true;
#endif
return true;
}