зеркало из https://github.com/mozilla/gecko-dev.git
Bug 836457 - Don't start forgetSkippable/GC timer before first GC, r=mccr8
This commit is contained in:
Родитель
a6bc5aed35
Коммит
801e8d6b46
|
@ -149,6 +149,8 @@ static PRTime sCCLockedOutTime;
|
||||||
static JS::GCSliceCallback sPrevGCSliceCallback;
|
static JS::GCSliceCallback sPrevGCSliceCallback;
|
||||||
static js::AnalysisPurgeCallback sPrevAnalysisPurgeCallback;
|
static js::AnalysisPurgeCallback sPrevAnalysisPurgeCallback;
|
||||||
|
|
||||||
|
static bool sHasRunGC;
|
||||||
|
|
||||||
// The number of currently pending document loads. This count isn't
|
// The number of currently pending document loads. This count isn't
|
||||||
// guaranteed to always reflect reality and can't easily as we don'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
|
// have an easy place to know when a load ends or is interrupted in
|
||||||
|
@ -3080,7 +3082,7 @@ nsJSContext::PokeShrinkGCBuffers()
|
||||||
void
|
void
|
||||||
nsJSContext::MaybePokeCC()
|
nsJSContext::MaybePokeCC()
|
||||||
{
|
{
|
||||||
if (sCCTimer || sShuttingDown) {
|
if (sCCTimer || sShuttingDown || !sHasRunGC) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3239,6 +3241,7 @@ DOMGCSliceCallback(JSRuntime *aRt, JS::GCProgress aProgress, const JS::GCDescrip
|
||||||
sCCollectedWaitingForGC = 0;
|
sCCollectedWaitingForGC = 0;
|
||||||
sCleanupsSinceLastGC = 0;
|
sCleanupsSinceLastGC = 0;
|
||||||
sNeedsFullCC = true;
|
sNeedsFullCC = true;
|
||||||
|
sHasRunGC = true;
|
||||||
nsJSContext::MaybePokeCC();
|
nsJSContext::MaybePokeCC();
|
||||||
|
|
||||||
if (aDesc.isCompartment) {
|
if (aDesc.isCompartment) {
|
||||||
|
@ -3358,6 +3361,7 @@ nsJSRuntime::Startup()
|
||||||
sCCLockedOut = false;
|
sCCLockedOut = false;
|
||||||
sCCLockedOutTime = 0;
|
sCCLockedOutTime = 0;
|
||||||
sLastCCEndTime = 0;
|
sLastCCEndTime = 0;
|
||||||
|
sHasRunGC = false;
|
||||||
sPendingLoadCount = 0;
|
sPendingLoadCount = 0;
|
||||||
sLoadingInProgress = false;
|
sLoadingInProgress = false;
|
||||||
sCCollectedWaitingForGC = 0;
|
sCCollectedWaitingForGC = 0;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче