зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
2185e5be3d
Коммит
c891ad6099
|
@ -8,33 +8,6 @@
|
||||||
|
|
||||||
#include "mozilla/SchedulerGroup.h"
|
#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(
|
void nsILabelableRunnable::SchedulerGroupSet::Put(
|
||||||
mozilla::SchedulerGroup* aGroup) {
|
mozilla::SchedulerGroup* aGroup) {
|
||||||
if (mSingle) {
|
if (mSingle) {
|
||||||
|
|
|
@ -63,10 +63,6 @@ class nsILabelableRunnable : public nsISupports {
|
||||||
// runnable. If this returns false, no assumptions can be made about which
|
// runnable. If this returns false, no assumptions can be made about which
|
||||||
// SchedulerGroups are affected by the runnable.
|
// SchedulerGroups are affected by the runnable.
|
||||||
virtual bool GetAffectedSchedulerGroups(SchedulerGroupSet& aGroups) = 0;
|
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);
|
NS_DEFINE_STATIC_IID_ACCESSOR(nsILabelableRunnable, NS_ILABELABLERUNNABLE_IID);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче