Loading js/public/SliceBudget.h +0 −8 Original line number Diff line number Diff line Loading @@ -98,14 +98,6 @@ class JS_PUBLIC_API SliceBudget { } } [[nodiscard]] bool checkAndResetOverBudget() { if (isOverBudget()) { resetOverBudget(); return true; } return false; } bool isWorkBudget() const { return budget.is<WorkBudget>(); } bool isTimeBudget() const { return budget.is<TimeBudget>(); } bool isUnlimited() const { return budget.is<UnlimitedBudget>(); } Loading xpcom/base/CycleCollectedJSRuntime.cpp +0 −1 Original line number Diff line number Diff line Loading @@ -1464,7 +1464,6 @@ bool CycleCollectedJSRuntime::TraceJSHolders(JSTracer* aTracer, aBudget.step(); } aBudget.resetOverBudget(); return aIter.Done(); } Loading xpcom/base/nsCycleCollector.cpp +3 −6 Original line number Diff line number Diff line Loading @@ -2060,8 +2060,6 @@ MOZ_NEVER_INLINE bool CCGraphBuilder::BuildGraph(SliceBudget& aBudget) { aBudget.step(mNoteChildCount + 1); } aBudget.resetOverBudget(); if (!mCurrNode->IsDone()) { return false; } Loading Loading @@ -2425,7 +2423,7 @@ class SnowWhiteKiller : public TraceCallbacks { public: bool Visit(nsPurpleBuffer& aBuffer, nsPurpleBufferEntry* aEntry) { if (mBudget) { if (mBudget->checkAndResetOverBudget()) { if (mBudget->isOverBudget()) { return false; } mBudget->step(); Loading Loading @@ -2529,7 +2527,7 @@ class RemoveSkippableVisitor : public SnowWhiteKiller { } bool Visit(nsPurpleBuffer& aBuffer, nsPurpleBufferEntry* aEntry) { if (mBudget.checkAndResetOverBudget()) { if (mBudget.isOverBudget()) { return false; } Loading Loading @@ -3444,8 +3442,6 @@ bool nsCycleCollector::Collect(CCReason aReason, ccIsManual aIsManual, } } while (continueSlice); aBudget.resetOverBudget(); // Clear mActivelyCollecting here to ensure that a recursive call to // Collect() does something. mActivelyCollecting = false; Loading @@ -3455,6 +3451,7 @@ bool nsCycleCollector::Collect(CCReason aReason, ccIsManual aIsManual, // Somebody has forced a CC, so after having finished out the current CC, // run the CC again using the new listener. MOZ_ASSERT(IsIdle()); aBudget.resetOverBudget(); if (Collect(aReason, ccIsManual::CCIsManual, aBudget, aManualListener)) { collectedAny = true; } Loading Loading
js/public/SliceBudget.h +0 −8 Original line number Diff line number Diff line Loading @@ -98,14 +98,6 @@ class JS_PUBLIC_API SliceBudget { } } [[nodiscard]] bool checkAndResetOverBudget() { if (isOverBudget()) { resetOverBudget(); return true; } return false; } bool isWorkBudget() const { return budget.is<WorkBudget>(); } bool isTimeBudget() const { return budget.is<TimeBudget>(); } bool isUnlimited() const { return budget.is<UnlimitedBudget>(); } Loading
xpcom/base/CycleCollectedJSRuntime.cpp +0 −1 Original line number Diff line number Diff line Loading @@ -1464,7 +1464,6 @@ bool CycleCollectedJSRuntime::TraceJSHolders(JSTracer* aTracer, aBudget.step(); } aBudget.resetOverBudget(); return aIter.Done(); } Loading
xpcom/base/nsCycleCollector.cpp +3 −6 Original line number Diff line number Diff line Loading @@ -2060,8 +2060,6 @@ MOZ_NEVER_INLINE bool CCGraphBuilder::BuildGraph(SliceBudget& aBudget) { aBudget.step(mNoteChildCount + 1); } aBudget.resetOverBudget(); if (!mCurrNode->IsDone()) { return false; } Loading Loading @@ -2425,7 +2423,7 @@ class SnowWhiteKiller : public TraceCallbacks { public: bool Visit(nsPurpleBuffer& aBuffer, nsPurpleBufferEntry* aEntry) { if (mBudget) { if (mBudget->checkAndResetOverBudget()) { if (mBudget->isOverBudget()) { return false; } mBudget->step(); Loading Loading @@ -2529,7 +2527,7 @@ class RemoveSkippableVisitor : public SnowWhiteKiller { } bool Visit(nsPurpleBuffer& aBuffer, nsPurpleBufferEntry* aEntry) { if (mBudget.checkAndResetOverBudget()) { if (mBudget.isOverBudget()) { return false; } Loading Loading @@ -3444,8 +3442,6 @@ bool nsCycleCollector::Collect(CCReason aReason, ccIsManual aIsManual, } } while (continueSlice); aBudget.resetOverBudget(); // Clear mActivelyCollecting here to ensure that a recursive call to // Collect() does something. mActivelyCollecting = false; Loading @@ -3455,6 +3451,7 @@ bool nsCycleCollector::Collect(CCReason aReason, ccIsManual aIsManual, // Somebody has forced a CC, so after having finished out the current CC, // run the CC again using the new listener. MOZ_ASSERT(IsIdle()); aBudget.resetOverBudget(); if (Collect(aReason, ccIsManual::CCIsManual, aBudget, aManualListener)) { collectedAny = true; } Loading