From c891ad60990624bbf188236c1f33b95962f07ad9 Mon Sep 17 00:00:00 2001 From: Nathan Froyd Date: Mon, 4 Feb 2019 15:33:49 -0500 Subject: [PATCH] Bug 1525031 - part 1 - remove nsILabelableRunnable::IsReadyToRun; r=mccr8 Nobody calls this now that the cooperative scheduler has been removed. --- xpcom/threads/nsILabelableRunnable.cpp | 27 -------------------------- xpcom/threads/nsILabelableRunnable.h | 4 ---- 2 files changed, 31 deletions(-) diff --git a/xpcom/threads/nsILabelableRunnable.cpp b/xpcom/threads/nsILabelableRunnable.cpp index eece72e9b2f9..b6d944317843 100644 --- a/xpcom/threads/nsILabelableRunnable.cpp +++ b/xpcom/threads/nsILabelableRunnable.cpp @@ -8,33 +8,6 @@ #include "mozilla/SchedulerGroup.h" -bool nsILabelableRunnable::IsReadyToRun() { - SchedulerGroupSet groups; - if (!GetAffectedSchedulerGroups(groups)) { - // it can not be labeled right now. - return false; - } - - if (groups.mSingle) { - MOZ_ASSERT(groups.mMulti.isNothing()); - return !groups.mSingle->IsRunning(); - } - - if (groups.mMulti.isSome()) { - MOZ_ASSERT(!groups.mSingle); - for (auto iter = groups.mMulti.ref().ConstIter(); !iter.Done(); - iter.Next()) { - if (iter.Get()->GetKey()->IsRunning()) { - return false; - } - } - return true; - } - - // No affected groups if we are here. Then, it's ready to run. - return true; -} - void nsILabelableRunnable::SchedulerGroupSet::Put( mozilla::SchedulerGroup* aGroup) { if (mSingle) { diff --git a/xpcom/threads/nsILabelableRunnable.h b/xpcom/threads/nsILabelableRunnable.h index 28ca7046a0b7..c212888927fd 100644 --- a/xpcom/threads/nsILabelableRunnable.h +++ b/xpcom/threads/nsILabelableRunnable.h @@ -63,10 +63,6 @@ class nsILabelableRunnable : public nsISupports { // runnable. If this returns false, no assumptions can be made about which // SchedulerGroups are affected by the runnable. virtual bool GetAffectedSchedulerGroups(SchedulerGroupSet& aGroups) = 0; - - // Returns true if the runnable can be labeled right now and none of its - // affected scheduler groups is running. - bool IsReadyToRun(); }; NS_DEFINE_STATIC_IID_ACCESSOR(nsILabelableRunnable, NS_ILABELABLERUNNABLE_IID);