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);