/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* vim:expandtab:shiftwidth=2:tabstop=2:
*/ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
namespace mozilla::dom { class WebTaskQueue; class WebTask : public LinkedListElement<RefPtr<WebTask>>, public AbortFollower, public SupportsWeakPtr { friendclass WebTaskScheduler;
void RemoveEntryFromTaskQueueMapIfNeeded(); // TODO: To optimize it, we could have the scheduled and unscheduled // tasks stored separately.
WebTask* GetFirstScheduledTask() { for (constauto& task : mTasks) { if (task->HasScheduled()) { return task;
}
} return nullptr;
}
// When mOwnerKey is TaskSignal*, it means as long as // WebTaskQueue is alive, the corresponding TaskSignal // is alive, so using a raw pointer is ok.
Variant<Nothing, uint32_t, TaskSignal*> mOwnerKey;
// WebTaskScheduler owns WebTaskQueue as a hashtable value, so using a raw // pointer points to WebTaskScheduler is ok.
WebTaskScheduler* mScheduler;
};
class WebTaskSchedulerMainThread; class WebTaskSchedulerWorker;
class WebTaskScheduler : public nsWrapperCache, public SupportsWeakPtr { friendclass DelayedWebTaskHandler;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.