This is an automated email from the git hooks/post-receive script.
pierov pushed a commit to branch geckoview-99.0.1-11.0-1 in repository tor-browser.
commit 2d36d04f26c6e057d982303db49eb0f6d8b132f7 Author: donal meehan dmeehan@mozilla.com AuthorDate: Wed Mar 23 17:24:15 2022 -0400
Backed out changeset 77b0b0003ca0 (bug 1661293) for causing Bug 1758370 --- dom/base/CCGCScheduler.cpp | 16 +--------------- dom/base/CCGCScheduler.h | 30 +----------------------------- dom/base/nsJSEnvironment.cpp | 5 ----- 3 files changed, 2 insertions(+), 49 deletions(-)
diff --git a/dom/base/CCGCScheduler.cpp b/dom/base/CCGCScheduler.cpp index f361be97baa44..efa5c77720beb 100644 --- a/dom/base/CCGCScheduler.cpp +++ b/dom/base/CCGCScheduler.cpp @@ -135,7 +135,6 @@ void CCGCScheduler::NoteGCBegin(JS::GCReason aReason) { void CCGCScheduler::NoteGCEnd() { mMajorGCReason = JS::GCReason::NO_REASON; mEagerMajorGCReason = JS::GCReason::NO_REASON; - mEagerMinorGCReason = JS::GCReason::NO_REASON;
mInIncrementalGC = false; mCCBlockStart = TimeStamp(); @@ -230,11 +229,6 @@ bool CCGCScheduler::GCRunnerFired(TimeStamp aDeadline) { KillGCRunner(); return false;
- case GCRunnerAction::MinorGC: - JS::RunIdleTimeGCTask(CycleCollectedJSRuntime::Get()->Runtime()); - NoteMinorGCEnd(); - return HasMoreIdleGCRunnerWork(); - case GCRunnerAction::WaitToMajorGC: { MOZ_ASSERT(!mHaveAskedParent, "GCRunner alive after asking the parent"); RefPtrCCGCScheduler::MayGCPromise mbPromise = @@ -475,7 +469,7 @@ void CCGCScheduler::PokeGC(JS::GCReason aReason, JSObject* aObj, }
if (mGCRunner || mHaveAskedParent) { - // There's already a GC runner, or there will be, so just return. + // There's already a GC runner, there or will be, so just return. return; }
@@ -805,10 +799,6 @@ CCRunnerStep CCGCScheduler::AdvanceCCRunner(TimeStamp aDeadline, TimeStamp aNow, return {CCRunnerAction::StopRunning, Yield}; }
- if (mEagerMinorGCReason != JS::GCReason::NO_REASON && !aDeadline.IsNull()) { - return {CCRunnerAction::MinorGC, Continue}; - } - switch (mCCRunnerState) { // ReducePurple: a GC ran (or we otherwise decided to try CC'ing). Wait // for some amount of time (kCCDelay, or less if incremental GC blocked @@ -923,10 +913,6 @@ GCRunnerStep CCGCScheduler::GetNextGCRunnerAction(TimeStamp aDeadline) const { : GCRunnerAction::WaitToMajorGC, mEagerMajorGCReason}; } - - if (mEagerMinorGCReason != JS::GCReason::NO_REASON) { - return {GCRunnerAction::MinorGC, mEagerMinorGCReason}; - } }
return {GCRunnerAction::None, JS::GCReason::NO_REASON}; diff --git a/dom/base/CCGCScheduler.h b/dom/base/CCGCScheduler.h index cf9c2c90aee20..466e5ace9977d 100644 --- a/dom/base/CCGCScheduler.h +++ b/dom/base/CCGCScheduler.h @@ -63,7 +63,6 @@ static const uint32_t kCCPurpleLimit = 200;
// Actions performed by the GCRunner state machine. enum class GCRunnerAction { - MinorGC, // Run a minor GC (nursery collection) WaitToMajorGC, // We want to start a new major GC StartMajorGC, // The parent says we may begin our major GC GCSlice, // Run a single slice of a major GC @@ -75,24 +74,12 @@ struct GCRunnerStep { JS::GCReason mReason; };
-// Actions that are output from the CCRunner state machine. enum class CCRunnerAction { - // Do nothing. None, - - // We crossed an eager minor GC threshold in the middle of an incremental CC, - // and we have some idle time. - MinorGC, - - // Various cleanup actions. ForgetSkippable, CleanupContentUnbinder, CleanupDeferred, - - // Do the actual cycle collection (build the graph etc). CycleCollect, - - // All done. StopRunning };
@@ -104,7 +91,7 @@ enum CCRunnerForgetSkippableRemoveChildless { };
struct CCRunnerStep { - // The action the scheduler is instructing the caller to perform. + // The action to scheduler is instructing the caller to perform. CCRunnerAction mAction;
// Whether to stop processing actions for this invocation of the timer @@ -228,12 +215,6 @@ class CCGCScheduler { } }
- void SetWantEagerMinorGC(JS::GCReason aReason) { - if (mEagerMinorGCReason == JS::GCReason::NO_REASON) { - mEagerMinorGCReason = aReason; - } - } - // Ensure that the current runner does a cycle collection, and trigger a GC // after it finishes. void EnsureCCThenGC(CCReason aReason) { @@ -262,8 +243,6 @@ class CCGCScheduler { // A timer fired, but then decided not to run a GC. void NoteWontGC();
- void NoteMinorGCEnd() { mEagerMinorGCReason = JS::GCReason::NO_REASON; } - // This is invoked when we reach the actual cycle collection portion of the // overall cycle collection. void NoteCCBegin(CCReason aReason, TimeStamp aWhen); @@ -445,12 +424,6 @@ class CCGCScheduler { mCCReason = CCReason::NO_REASON; }
- bool HasMoreIdleGCRunnerWork() const { - return mMajorGCReason != JS::GCReason::NO_REASON || - mEagerMajorGCReason != JS::GCReason::NO_REASON || - mEagerMinorGCReason != JS::GCReason::NO_REASON; - } - GCRunnerStep GetNextGCRunnerAction(TimeStamp aDeadline) const;
CCRunnerStep AdvanceCCRunner(TimeStamp aDeadline, TimeStamp aNow, @@ -524,7 +497,6 @@ class CCGCScheduler { mozilla::CCReason mCCReason = mozilla::CCReason::NO_REASON; JS::GCReason mMajorGCReason = JS::GCReason::NO_REASON; JS::GCReason mEagerMajorGCReason = JS::GCReason::NO_REASON; - JS::GCReason mEagerMinorGCReason = JS::GCReason::NO_REASON;
bool mIsCompactingOnUserInactive = false; bool mIsCollectingCycles = false; diff --git a/dom/base/nsJSEnvironment.cpp b/dom/base/nsJSEnvironment.cpp index 3af7d18feac13..eed3705ab33d8 100644 --- a/dom/base/nsJSEnvironment.cpp +++ b/dom/base/nsJSEnvironment.cpp @@ -1547,11 +1547,6 @@ bool CCGCScheduler::CCRunnerFired(TimeStamp aDeadline) { case CCRunnerAction::None: break;
- case CCRunnerAction::MinorGC: - JS::RunIdleTimeGCTask(CycleCollectedJSRuntime::Get()->Runtime()); - sScheduler.NoteMinorGCEnd(); - break; - case CCRunnerAction::ForgetSkippable: // 'Forget skippable' only, then end this invocation. FireForgetSkippable(bool(step.mRemoveChildless), aDeadline);