Bug 835503 - Remove nsCycleCollector::ShouldBeFreed/WasFreed, r=mccr8
This commit is contained in:
@@ -1100,13 +1100,9 @@ struct nsCycleCollector
|
||||
#ifdef DEBUG_CC
|
||||
nsCycleCollectorStats mStats;
|
||||
FILE *mPtrLog;
|
||||
PointerSet mExpectedGarbage;
|
||||
|
||||
bool LogPurpleAddition(void* aObject, nsCycleCollectionParticipant *cp);
|
||||
void LogPurpleRemoval(void* aObject);
|
||||
|
||||
void ShouldBeFreed(nsISupports *n);
|
||||
void WasFreed(nsISupports *n);
|
||||
#endif
|
||||
};
|
||||
|
||||
@@ -2545,9 +2541,6 @@ nsCycleCollector::nsCycleCollector() :
|
||||
mPurpleBuf(mParams)
|
||||
#endif
|
||||
{
|
||||
#ifdef DEBUG_CC
|
||||
mExpectedGarbage.Init();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -3098,24 +3091,6 @@ nsCycleCollector::Shutdown()
|
||||
mParams.mDoNothing = true;
|
||||
}
|
||||
|
||||
#ifdef DEBUG_CC
|
||||
void
|
||||
nsCycleCollector::ShouldBeFreed(nsISupports *n)
|
||||
{
|
||||
if (n) {
|
||||
mExpectedGarbage.PutEntry(n);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
nsCycleCollector::WasFreed(nsISupports *n)
|
||||
{
|
||||
if (n) {
|
||||
mExpectedGarbage.RemoveEntry(n);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
nsCycleCollector::SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf,
|
||||
size_t *aObjectSize,
|
||||
@@ -3140,7 +3115,7 @@ nsCycleCollector::SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf,
|
||||
// - mResults: because it's tiny and only contains scalars.
|
||||
// - mJSRuntime: because it's non-owning and measured by JS reporters.
|
||||
// - mParams: because it only contains scalars.
|
||||
// - mStats, mPtrLog, mExpectedGarbage: because they're DEBUG_CC-only.
|
||||
// - mStats, mPtrLog: because they're DEBUG_CC-only.
|
||||
}
|
||||
|
||||
|
||||
@@ -3183,26 +3158,6 @@ nsCycleCollector_suspectedCount()
|
||||
return sCollector ? sCollector->SuspectedCount() : 0;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
void
|
||||
nsCycleCollector_DEBUG_shouldBeFreed(nsISupports *n)
|
||||
{
|
||||
#ifdef DEBUG_CC
|
||||
if (sCollector)
|
||||
sCollector->ShouldBeFreed(n);
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
nsCycleCollector_DEBUG_wasFreed(nsISupports *n)
|
||||
{
|
||||
#ifdef DEBUG_CC
|
||||
if (sCollector)
|
||||
sCollector->WasFreed(n);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
class nsCycleCollectorRunner : public nsRunnable
|
||||
{
|
||||
nsCycleCollector *mCollector;
|
||||
|
||||
Reference in New Issue
Block a user