mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 836457 - Don't start forgetSkippable/GC timer before first GC, r=mccr8
This commit is contained in:
parent
19b17a8f32
commit
c77d9c747c
@ -149,6 +149,8 @@ static PRTime sCCLockedOutTime;
|
||||
static JS::GCSliceCallback sPrevGCSliceCallback;
|
||||
static js::AnalysisPurgeCallback sPrevAnalysisPurgeCallback;
|
||||
|
||||
static bool sHasRunGC;
|
||||
|
||||
// The number of currently pending document loads. This count isn't
|
||||
// guaranteed to always reflect reality and can't easily as we don't
|
||||
// have an easy place to know when a load ends or is interrupted in
|
||||
@ -3080,7 +3082,7 @@ nsJSContext::PokeShrinkGCBuffers()
|
||||
void
|
||||
nsJSContext::MaybePokeCC()
|
||||
{
|
||||
if (sCCTimer || sShuttingDown) {
|
||||
if (sCCTimer || sShuttingDown || !sHasRunGC) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -3239,6 +3241,7 @@ DOMGCSliceCallback(JSRuntime *aRt, JS::GCProgress aProgress, const JS::GCDescrip
|
||||
sCCollectedWaitingForGC = 0;
|
||||
sCleanupsSinceLastGC = 0;
|
||||
sNeedsFullCC = true;
|
||||
sHasRunGC = true;
|
||||
nsJSContext::MaybePokeCC();
|
||||
|
||||
if (aDesc.isCompartment) {
|
||||
@ -3358,6 +3361,7 @@ nsJSRuntime::Startup()
|
||||
sCCLockedOut = false;
|
||||
sCCLockedOutTime = 0;
|
||||
sLastCCEndTime = 0;
|
||||
sHasRunGC = false;
|
||||
sPendingLoadCount = 0;
|
||||
sLoadingInProgress = false;
|
||||
sCCollectedWaitingForGC = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user