mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
Bug 1253094, part 9 - Stop using DebugOnly for class/struct members in xpcom/. r=froydnj
MozReview-Commit-ID: ACYMR37DGU9
This commit is contained in:
parent
682b1373b2
commit
6691a673f4
@ -1275,7 +1275,9 @@ private:
|
|||||||
nsAutoPtr<CCGraphBuilder> mBuilder;
|
nsAutoPtr<CCGraphBuilder> mBuilder;
|
||||||
RefPtr<nsCycleCollectorLogger> mLogger;
|
RefPtr<nsCycleCollectorLogger> mLogger;
|
||||||
|
|
||||||
DebugOnly<void*> mThread;
|
#ifdef DEBUG
|
||||||
|
void* mThread;
|
||||||
|
#endif
|
||||||
|
|
||||||
nsCycleCollectorParams mParams;
|
nsCycleCollectorParams mParams;
|
||||||
|
|
||||||
@ -3402,7 +3404,9 @@ nsCycleCollector::nsCycleCollector() :
|
|||||||
mScanInProgress(false),
|
mScanInProgress(false),
|
||||||
mJSRuntime(nullptr),
|
mJSRuntime(nullptr),
|
||||||
mIncrementalPhase(IdlePhase),
|
mIncrementalPhase(IdlePhase),
|
||||||
|
#ifdef DEBUG
|
||||||
mThread(NS_GetCurrentThread()),
|
mThread(NS_GetCurrentThread()),
|
||||||
|
#endif
|
||||||
mWhiteNodeCount(0),
|
mWhiteNodeCount(0),
|
||||||
mBeforeUnlinkCB(nullptr),
|
mBeforeUnlinkCB(nullptr),
|
||||||
mForgetSkippableCB(nullptr),
|
mForgetSkippableCB(nullptr),
|
||||||
@ -4025,11 +4029,13 @@ nsCycleCollector_suspectedCount()
|
|||||||
bool
|
bool
|
||||||
nsCycleCollector_init()
|
nsCycleCollector_init()
|
||||||
{
|
{
|
||||||
static DebugOnly<bool> sInitialized;
|
#ifdef DEBUG
|
||||||
|
static bool sInitialized;
|
||||||
|
|
||||||
MOZ_ASSERT(NS_IsMainThread(), "Wrong thread!");
|
MOZ_ASSERT(NS_IsMainThread(), "Wrong thread!");
|
||||||
MOZ_ASSERT(!sInitialized, "Called twice!?");
|
MOZ_ASSERT(!sInitialized, "Called twice!?");
|
||||||
sInitialized = true;
|
sInitialized = true;
|
||||||
|
#endif
|
||||||
|
|
||||||
return sCollectorData.init();
|
return sCollectorData.init();
|
||||||
}
|
}
|
||||||
|
@ -222,7 +222,9 @@ doGCCCDump(const nsCString& aInputStr)
|
|||||||
bool
|
bool
|
||||||
SetupFifo()
|
SetupFifo()
|
||||||
{
|
{
|
||||||
static DebugOnly<bool> fifoCallbacksRegistered = false;
|
#ifdef DEBUG
|
||||||
|
static bool fifoCallbacksRegistered = false;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (!FifoWatcher::MaybeCreate()) {
|
if (!FifoWatcher::MaybeCreate()) {
|
||||||
return false;
|
return false;
|
||||||
@ -243,7 +245,9 @@ SetupFifo()
|
|||||||
fw->RegisterCallback(NS_LITERAL_CSTRING("abbreviated gc log"),
|
fw->RegisterCallback(NS_LITERAL_CSTRING("abbreviated gc log"),
|
||||||
doGCCCDump);
|
doGCCCDump);
|
||||||
|
|
||||||
|
#ifdef DEBUG
|
||||||
fifoCallbacksRegistered = true;
|
fifoCallbacksRegistered = true;
|
||||||
|
#endif
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user