Bug 1525031 - part 1 - remove nsILabelableRunnable::IsReadyToRun; r=mccr8

Nobody calls this now that the cooperative scheduler has been removed.
This commit is contained in:
Nathan Froyd 2019-02-04 15:33:49 -05:00
Родитель 2185e5be3d
Коммит c891ad6099
2 изменённых файлов: 0 добавлений и 31 удалений

Просмотреть файл

@ -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) {

Просмотреть файл

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