Bug 1004017 - Rename CycleCollectedJSRuntime::NeedCollect() and Collect(). r=smaug

This commit is contained in:
Andrew McCreight 2014-05-06 17:25:26 -07:00
parent 8825a1d4bc
commit 36c281bf5c
4 changed files with 8 additions and 8 deletions

View File

@ -250,7 +250,7 @@ nsXPConnect::GetInfoForName(const char * name, nsIInterfaceInfo** info)
NS_IMETHODIMP
nsXPConnect::GarbageCollect(uint32_t reason)
{
GetRuntime()->Collect(reason);
GetRuntime()->GarbageCollect(reason);
return NS_OK;
}

View File

@ -949,13 +949,13 @@ CycleCollectedJSRuntime::FixWeakMappingGrayBits() const
}
bool
CycleCollectedJSRuntime::NeedCollect() const
CycleCollectedJSRuntime::AreGCGrayBitsValid() const
{
return !js::AreGCGrayBitsValid(mJSRuntime);
return js::AreGCGrayBitsValid(mJSRuntime);
}
void
CycleCollectedJSRuntime::Collect(uint32_t aReason) const
CycleCollectedJSRuntime::GarbageCollect(uint32_t aReason) const
{
MOZ_ASSERT(aReason < JS::gcreason::NUM_REASONS);
JS::gcreason::Reason gcreason = static_cast<JS::gcreason::Reason>(aReason);

View File

@ -198,8 +198,8 @@ public:
nsresult TraverseRoots(nsCycleCollectionNoteRootCallback &aCb);
bool UsefulToMergeZones() const;
void FixWeakMappingGrayBits() const;
bool NeedCollect() const;
void Collect(uint32_t reason) const;
bool AreGCGrayBitsValid() const;
void GarbageCollect(uint32_t reason) const;
void DeferredFinalize(DeferredFinalizeAppendFunction aAppendFunc,
DeferredFinalizeFunction aFunc,

View File

@ -3213,7 +3213,7 @@ nsCycleCollector::FixGrayBits(bool aForceGC)
if (!aForceGC) {
mJSRuntime->FixWeakMappingGrayBits();
bool needGC = mJSRuntime->NeedCollect();
bool needGC = !mJSRuntime->AreGCGrayBitsValid();
// Only do a telemetry ping for non-shutdown CCs.
CC_TELEMETRY(_NEED_GC, needGC);
if (!needGC)
@ -3222,7 +3222,7 @@ nsCycleCollector::FixGrayBits(bool aForceGC)
}
TimeLog timeLog;
mJSRuntime->Collect(aForceGC ? JS::gcreason::SHUTDOWN_CC : JS::gcreason::CC_FORCED);
mJSRuntime->GarbageCollect(aForceGC ? JS::gcreason::SHUTDOWN_CC : JS::gcreason::CC_FORCED);
timeLog.Checkpoint("GC()");
}