mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1004017 - Rename CycleCollectedJSRuntime::NeedCollect() and Collect(). r=smaug
This commit is contained in:
parent
8825a1d4bc
commit
36c281bf5c
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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,
|
||||
|
@ -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()");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user