Copy as Markdown
Other Tools
/* THIS FILE IS AUTOGENERATED FROM WebTaskScheduling.webidl BY Codegen.py - DO NOT EDIT */
#ifndef DOM_WEBTASKSCHEDULINGBINDING_H_
#define DOM_WEBTASKSCHEDULINGBINDING_H_
#include "js/CallAndConstruct.h"
#include "js/RootingAPI.h"
#include "js/TypeDecls.h"
#include "mozilla/ArrayUtils.h"
#include "mozilla/EnumTypeTraits.h"
#include "mozilla/Span.h"
#include "mozilla/dom/AbortSignal.h"
#include "mozilla/dom/BindingDeclarations.h"
#include "mozilla/dom/CallbackFunction.h"
#include "mozilla/dom/FakeString.h"
#include "mozilla/dom/Nullable.h"
#include "mozilla/dom/PrototypeList.h"
#include "mozilla/dom/ToJSValue.h"
#include "mozilla/dom/UnionMember.h"
#include "nsCycleCollectionParticipant.h"
namespace mozilla {
namespace dom {
class AbortSignal;
struct NativePropertyHooks;
class OwningTaskPriorityOrTaskSignal;
class ProtoAndIfaceCache;
class SchedulerPostTaskCallback;
struct SchedulerPostTaskOptionsAtoms;
struct TaskControllerInitAtoms;
class TaskPriorityOrTaskSignal;
class TaskSignal;
struct TaskSignalAnyInitAtoms;
class WebTaskController;
class WebTaskScheduler;
} // namespace dom
} // namespace mozilla
namespace mozilla {
namespace dom {
enum class TaskPriority : uint8_t {
User_blocking,
User_visible,
Background,
};
namespace binding_detail {
template <> struct EnumStrings<TaskPriority> {
static constexpr nsLiteralCString Values[3] {
"user-blocking"_ns,
"user-visible"_ns,
"background"_ns,
};
};
} // namespace binding_detail
bool
ToJSValue(JSContext* aCx, TaskPriority aArgument, JS::MutableHandle<JS::Value> aValue);
void
ImplCycleCollectionTraverse(nsCycleCollectionTraversalCallback& aCallback, OwningTaskPriorityOrTaskSignal& aUnion, const char* aName, uint32_t aFlags = 0);
void
ImplCycleCollectionUnlink(OwningTaskPriorityOrTaskSignal& aUnion);
class SchedulerPostTaskCallback : public CallbackFunction
{
public:
explicit inline SchedulerPostTaskCallback(JSContext* aCx, JS::Handle<JSObject*> aCallback, JS::Handle<JSObject*> aCallbackGlobal, nsIGlobalObject* aIncumbentGlobal)
: CallbackFunction(aCx, aCallback, aCallbackGlobal, aIncumbentGlobal)
{
MOZ_ASSERT(JS::IsCallable(mCallback));
}
explicit inline SchedulerPostTaskCallback(JSObject* aCallback, JSObject* aCallbackGlobal, const FastCallbackConstructor& )
: CallbackFunction(aCallback, aCallbackGlobal, FastCallbackConstructor())
{
MOZ_ASSERT(JS::IsCallable(mCallback));
}
explicit inline SchedulerPostTaskCallback(JSObject* aCallback, JSObject* aCallbackGlobal, JSObject* aAsyncStack, nsIGlobalObject* aIncumbentGlobal)
: CallbackFunction(aCallback, aCallbackGlobal, aAsyncStack, aIncumbentGlobal)
{
MOZ_ASSERT(JS::IsCallable(mCallback));
}
explicit inline SchedulerPostTaskCallback(CallbackFunction* aOther)
: CallbackFunction(aOther)
{
}
template <typename T>
MOZ_CAN_RUN_SCRIPT inline void
Call(const T& thisVal, JS::MutableHandle<JS::Value> aRetVal, ErrorResult& aRv, const char* aExecutionReason = nullptr, ExceptionHandling aExceptionHandling = eReportExceptions, JS::Realm* aRealm = nullptr)
{
MOZ_ASSERT(!aRv.Failed(), "Don't pass an already-failed ErrorResult to a callback!");
if (!aExecutionReason) {
aExecutionReason = "SchedulerPostTaskCallback";
}
CallSetup s(this, aRv, aExecutionReason, aExceptionHandling, aRealm);
if (!s.GetContext()) {
MOZ_ASSERT(aRv.Failed());
return;
}
JS::Rooted<JS::Value> thisValJS(s.GetContext());
if (!ToJSValue(s.GetContext(), thisVal, &thisValJS)) {
aRv.Throw(NS_ERROR_FAILURE);
return;
}
return Call(s.GetCallContext(), thisValJS, aRetVal, aRv);
}
MOZ_CAN_RUN_SCRIPT inline void
Call(JS::MutableHandle<JS::Value> aRetVal, ErrorResult& aRv, const char* aExecutionReason = nullptr, ExceptionHandling aExceptionHandling = eReportExceptions, JS::Realm* aRealm = nullptr)
{
MOZ_ASSERT(!aRv.Failed(), "Don't pass an already-failed ErrorResult to a callback!");
if (!aExecutionReason) {
aExecutionReason = "SchedulerPostTaskCallback";
}
CallSetup s(this, aRv, aExecutionReason, aExceptionHandling, aRealm);
if (!s.GetContext()) {
MOZ_ASSERT(aRv.Failed());
return;
}
return Call(s.GetCallContext(), JS::UndefinedHandleValue, aRetVal, aRv);
}
template <typename T>
MOZ_CAN_RUN_SCRIPT inline void
Call(const T& thisVal, JS::MutableHandle<JS::Value> aRetVal, const char* aExecutionReason = nullptr)
{
return Call(thisVal, aRetVal, IgnoreErrors(), aExecutionReason);
}
MOZ_CAN_RUN_SCRIPT inline void
Call(JS::MutableHandle<JS::Value> aRetVal, const char* aExecutionReason = nullptr)
{
return Call(aRetVal, IgnoreErrors(), aExecutionReason, eReportExceptions, nullptr);
}
inline bool
operator==(const SchedulerPostTaskCallback& aOther) const
{
return CallbackFunction::operator==(aOther);
}
private:
MOZ_CAN_RUN_SCRIPT void Call(BindingCallContext& cx, JS::Handle<JS::Value> aThisVal, JS::MutableHandle<JS::Value> aRetVal, ErrorResult& aRv);
};
namespace binding_detail {
class FastSchedulerPostTaskCallback : public SchedulerPostTaskCallback
{
public:
explicit inline FastSchedulerPostTaskCallback(JSObject* aCallback, JSObject* aCallbackGlobal)
: SchedulerPostTaskCallback(aCallback, aCallbackGlobal, FastCallbackConstructor())
{
}
inline void
Trace(JSTracer* aTracer)
{
SchedulerPostTaskCallback::Trace(aTracer);
}
inline void
FinishSlowJSInitIfMoreThanOneOwner(JSContext* aCx)
{
SchedulerPostTaskCallback::FinishSlowJSInitIfMoreThanOneOwner(aCx);
}
};
} // namespace binding_detail
struct SchedulerPostTaskOptions : public DictionaryBase
{
MOZ_INIT_OUTSIDE_CTOR uint64_t mDelay;
MOZ_INIT_OUTSIDE_CTOR Optional<TaskPriority> mPriority;
MOZ_INIT_OUTSIDE_CTOR Optional<OwningNonNull<mozilla::dom::AbortSignal>> mSignal;
SchedulerPostTaskOptions();
explicit inline SchedulerPostTaskOptions(const FastDictionaryInitializer& )
{
// Do nothing here; this is used by our "Fast" subclass
}
SchedulerPostTaskOptions(SchedulerPostTaskOptions&& aOther) = default;
explicit inline SchedulerPostTaskOptions(const SchedulerPostTaskOptions& aOther)
{
*this = aOther;
}
bool
Init(BindingCallContext& cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
bool
Init(JSContext* cx_, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
void
TraceDictionary(JSTracer* trc);
inline void
TraverseForCC(nsCycleCollectionTraversalCallback& aCallback, uint32_t aFlags)
{
ImplCycleCollectionTraverse(aCallback, mSignal, "mSignal", aFlags);
}
inline void
UnlinkForCC()
{
ImplCycleCollectionUnlink(mSignal);
}
SchedulerPostTaskOptions&
operator=(const SchedulerPostTaskOptions& aOther);
private:
static bool
InitIds(JSContext* cx, SchedulerPostTaskOptionsAtoms* atomsCache);
};
namespace binding_detail {
struct FastSchedulerPostTaskOptions : public SchedulerPostTaskOptions
{
inline FastSchedulerPostTaskOptions()
: SchedulerPostTaskOptions(FastDictionaryInitializer())
{
// Doesn't matter what int we pass to the parent constructor
}
};
} // namespace binding_detail
struct TaskControllerInit : public DictionaryBase
{
MOZ_INIT_OUTSIDE_CTOR TaskPriority mPriority;
TaskControllerInit();
explicit inline TaskControllerInit(const FastDictionaryInitializer& )
{
// Do nothing here; this is used by our "Fast" subclass
}
TaskControllerInit(TaskControllerInit&& aOther) = default;
explicit inline TaskControllerInit(const TaskControllerInit& aOther)
{
*this = aOther;
}
bool
Init(BindingCallContext& cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
bool
Init(JSContext* cx_, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
void
TraceDictionary(JSTracer* trc);
TaskControllerInit&
operator=(const TaskControllerInit& aOther);
private:
static bool
InitIds(JSContext* cx, TaskControllerInitAtoms* atomsCache);
};
namespace binding_detail {
struct FastTaskControllerInit : public TaskControllerInit
{
inline FastTaskControllerInit()
: TaskControllerInit(FastDictionaryInitializer())
{
// Doesn't matter what int we pass to the parent constructor
}
};
} // namespace binding_detail
class TaskPriorityOrTaskSignal : public AllUnionBase
{
enum TypeOrUninit
{
eUninitialized,
eTaskPriority,
eTaskSignal
};
public:
enum class Type
{
eTaskPriority = TypeOrUninit::eTaskPriority,
eTaskSignal = TypeOrUninit::eTaskSignal
};
private:
union Value
{
UnionMember<TaskPriority > mTaskPriority;
UnionMember<NonNull<mozilla::dom::TaskSignal> > mTaskSignal;
};
TypeOrUninit mType;
Value mValue;
TaskPriorityOrTaskSignal(const TaskPriorityOrTaskSignal&) = delete;
TaskPriorityOrTaskSignal& operator=(const TaskPriorityOrTaskSignal&) = delete;
public:
explicit inline TaskPriorityOrTaskSignal()
: mType(eUninitialized)
{
}
inline ~TaskPriorityOrTaskSignal()
{
Uninit();
}
[[nodiscard]] inline TaskPriority&
RawSetAsTaskPriority()
{
if (mType == eTaskPriority) {
return mValue.mTaskPriority.Value();
}
MOZ_ASSERT(mType == eUninitialized);
mType = eTaskPriority;
return mValue.mTaskPriority.SetValue();
}
[[nodiscard]] inline TaskPriority&
SetAsTaskPriority()
{
if (mType == eTaskPriority) {
return mValue.mTaskPriority.Value();
}
Uninit();
mType = eTaskPriority;
return mValue.mTaskPriority.SetValue();
}
inline bool
IsTaskPriority() const
{
return mType == eTaskPriority;
}
inline TaskPriority&
GetAsTaskPriority()
{
MOZ_RELEASE_ASSERT(IsTaskPriority(), "Wrong type!");
return mValue.mTaskPriority.Value();
}
inline TaskPriority
GetAsTaskPriority() const
{
MOZ_RELEASE_ASSERT(IsTaskPriority(), "Wrong type!");
return mValue.mTaskPriority.Value();
}
[[nodiscard]] inline NonNull<mozilla::dom::TaskSignal>&
RawSetAsTaskSignal()
{
if (mType == eTaskSignal) {
return mValue.mTaskSignal.Value();
}
MOZ_ASSERT(mType == eUninitialized);
mType = eTaskSignal;
return mValue.mTaskSignal.SetValue();
}
[[nodiscard]] inline NonNull<mozilla::dom::TaskSignal>&
SetAsTaskSignal()
{
if (mType == eTaskSignal) {
return mValue.mTaskSignal.Value();
}
Uninit();
mType = eTaskSignal;
return mValue.mTaskSignal.SetValue();
}
inline bool
IsTaskSignal() const
{
return mType == eTaskSignal;
}
inline NonNull<mozilla::dom::TaskSignal>&
GetAsTaskSignal()
{
MOZ_RELEASE_ASSERT(IsTaskSignal(), "Wrong type!");
return mValue.mTaskSignal.Value();
}
inline mozilla::dom::TaskSignal&
GetAsTaskSignal() const
{
MOZ_RELEASE_ASSERT(IsTaskSignal(), "Wrong type!");
return mValue.mTaskSignal.Value();
}
bool
Init(BindingCallContext& cx, JS::Handle<JS::Value> value, const char* sourceDescription = "Value", bool passedToJSImpl = false);
bool
Init(JSContext* cx_, JS::Handle<JS::Value> value, const char* sourceDescription = "Value", bool passedToJSImpl = false);
inline void
Uninit()
{
switch (mType) {
case eUninitialized: {
break;
}
case eTaskPriority: {
DestroyTaskPriority();
break;
}
case eTaskSignal: {
DestroyTaskSignal();
break;
}
}
}
bool
ToJSVal(JSContext* cx, JS::Handle<JSObject*> scopeObj, JS::MutableHandle<JS::Value> rval) const;
private:
bool
TrySetToTaskPriority(BindingCallContext& cx, JS::Handle<JS::Value> value, bool& tryNext, bool passedToJSImpl = false);
bool
TrySetToTaskPriority(JSContext* cx_, JS::Handle<JS::Value> value, bool& tryNext, bool passedToJSImpl = false);
inline void
DestroyTaskPriority()
{
MOZ_RELEASE_ASSERT(IsTaskPriority(), "Wrong type!");
mValue.mTaskPriority.Destroy();
mType = eUninitialized;
}
bool
TrySetToTaskSignal(BindingCallContext& cx, JS::Handle<JS::Value> value, bool& tryNext, bool passedToJSImpl = false);
bool
TrySetToTaskSignal(JSContext* cx_, JS::Handle<JS::Value> value, bool& tryNext, bool passedToJSImpl = false);
inline void
DestroyTaskSignal()
{
MOZ_RELEASE_ASSERT(IsTaskSignal(), "Wrong type!");
mValue.mTaskSignal.Destroy();
mType = eUninitialized;
}
};
class OwningTaskPriorityOrTaskSignal : public AllOwningUnionBase
{
friend void ImplCycleCollectionUnlink(OwningTaskPriorityOrTaskSignal& aUnion);
enum TypeOrUninit
{
eUninitialized,
eTaskPriority,
eTaskSignal
};
public:
enum class Type
{
eTaskPriority = TypeOrUninit::eTaskPriority,
eTaskSignal = TypeOrUninit::eTaskSignal
};
private:
union Value
{
UnionMember<TaskPriority > mTaskPriority;
UnionMember<OwningNonNull<mozilla::dom::TaskSignal> > mTaskSignal;
};
TypeOrUninit mType;
Value mValue;
public:
explicit inline OwningTaskPriorityOrTaskSignal()
: mType(eUninitialized)
{
}
OwningTaskPriorityOrTaskSignal(OwningTaskPriorityOrTaskSignal&& aOther);
explicit inline OwningTaskPriorityOrTaskSignal(const OwningTaskPriorityOrTaskSignal& aOther)
: mType(eUninitialized)
{
*this = aOther;
}
inline ~OwningTaskPriorityOrTaskSignal()
{
Uninit();
}
[[nodiscard]] TaskPriority&
RawSetAsTaskPriority();
[[nodiscard]] TaskPriority&
SetAsTaskPriority();
inline bool
IsTaskPriority() const
{
return mType == eTaskPriority;
}
inline TaskPriority&
GetAsTaskPriority()
{
MOZ_RELEASE_ASSERT(IsTaskPriority(), "Wrong type!");
return mValue.mTaskPriority.Value();
}
inline TaskPriority const &
GetAsTaskPriority() const
{
MOZ_RELEASE_ASSERT(IsTaskPriority(), "Wrong type!");
return mValue.mTaskPriority.Value();
}
[[nodiscard]] OwningNonNull<mozilla::dom::TaskSignal>&
RawSetAsTaskSignal();
[[nodiscard]] OwningNonNull<mozilla::dom::TaskSignal>&
SetAsTaskSignal();
inline bool
IsTaskSignal() const
{
return mType == eTaskSignal;
}
inline OwningNonNull<mozilla::dom::TaskSignal>&
GetAsTaskSignal()
{
MOZ_RELEASE_ASSERT(IsTaskSignal(), "Wrong type!");
return mValue.mTaskSignal.Value();
}
inline OwningNonNull<mozilla::dom::TaskSignal> const &
GetAsTaskSignal() const
{
MOZ_RELEASE_ASSERT(IsTaskSignal(), "Wrong type!");
return mValue.mTaskSignal.Value();
}
bool
Init(BindingCallContext& cx, JS::Handle<JS::Value> value, const char* sourceDescription = "Value", bool passedToJSImpl = false);
bool
Init(JSContext* cx_, JS::Handle<JS::Value> value, const char* sourceDescription = "Value", bool passedToJSImpl = false);
void
Uninit();
bool
ToJSVal(JSContext* cx, JS::Handle<JSObject*> scopeObj, JS::MutableHandle<JS::Value> rval) const;
OwningTaskPriorityOrTaskSignal&
operator=(OwningTaskPriorityOrTaskSignal&& aOther);
inline Type
GetType() const
{
MOZ_RELEASE_ASSERT(mType != eUninitialized);
return static_cast<Type>(mType);
}
OwningTaskPriorityOrTaskSignal&
operator=(const OwningTaskPriorityOrTaskSignal& aOther);
private:
bool
TrySetToTaskPriority(BindingCallContext& cx, JS::Handle<JS::Value> value, bool& tryNext, bool passedToJSImpl = false);
bool
TrySetToTaskPriority(JSContext* cx_, JS::Handle<JS::Value> value, bool& tryNext, bool passedToJSImpl = false);
void
DestroyTaskPriority();
bool
TrySetToTaskSignal(BindingCallContext& cx, JS::Handle<JS::Value> value, bool& tryNext, bool passedToJSImpl = false);
bool
TrySetToTaskSignal(JSContext* cx_, JS::Handle<JS::Value> value, bool& tryNext, bool passedToJSImpl = false);
void
DestroyTaskSignal();
};
struct TaskSignalAnyInit : public DictionaryBase
{
MOZ_INIT_OUTSIDE_CTOR OwningTaskPriorityOrTaskSignal mPriority;
TaskSignalAnyInit();
explicit inline TaskSignalAnyInit(const FastDictionaryInitializer& )
{
// Do nothing here; this is used by our "Fast" subclass
}
TaskSignalAnyInit(TaskSignalAnyInit&& aOther) = default;
explicit inline TaskSignalAnyInit(const TaskSignalAnyInit& aOther)
{
*this = aOther;
}
bool
Init(BindingCallContext& cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
bool
Init(JSContext* cx_, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
void
TraceDictionary(JSTracer* trc);
inline void
TraverseForCC(nsCycleCollectionTraversalCallback& aCallback, uint32_t aFlags)
{
ImplCycleCollectionTraverse(aCallback, mPriority, "mPriority", aFlags);
}
inline void
UnlinkForCC()
{
ImplCycleCollectionUnlink(mPriority);
}
TaskSignalAnyInit&
operator=(const TaskSignalAnyInit& aOther);
private:
static bool
InitIds(JSContext* cx, TaskSignalAnyInitAtoms* atomsCache);
};
namespace binding_detail {
struct FastTaskSignalAnyInit : public TaskSignalAnyInit
{
inline FastTaskSignalAnyInit()
: TaskSignalAnyInit(FastDictionaryInitializer())
{
// Doesn't matter what int we pass to the parent constructor
}
};
} // namespace binding_detail
namespace Scheduler_Binding {
typedef mozilla::dom::WebTaskScheduler NativeType;
bool
ConstructorEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj);
bool
Wrap(JSContext* aCx, mozilla::dom::WebTaskScheduler* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
template <class T>
inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
{
JS::Rooted<JSObject*> reflector(aCx);
return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
}
void
CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, DefineInterfaceProperty aDefineOnGlobal);
JS::Handle<JSObject*>
GetConstructorObjectHandle(JSContext* aCx);
inline bool CreateAndDefineOnGlobal(JSContext* aCx)
{
// Get the interface or namespace object for this class. This will
// create the object as needed and always define the properties for
// it on the global. The caller should make sure the interface or
// namespace is exposed on the global before calling this.
return GetPerInterfaceObjectHandle(aCx, constructors::id::Scheduler,
&CreateInterfaceObjects,
DefineInterfaceProperty::Always);
}
} // namespace Scheduler_Binding
namespace TaskController_Binding {
typedef mozilla::dom::WebTaskController NativeType;
bool
ConstructorEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj);
bool
Wrap(JSContext* aCx, mozilla::dom::WebTaskController* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
template <class T>
inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
{
JS::Rooted<JSObject*> reflector(aCx);
return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
}
void
CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, DefineInterfaceProperty aDefineOnGlobal);
JS::Handle<JSObject*>
GetConstructorObjectHandle(JSContext* aCx);
inline bool CreateAndDefineOnGlobal(JSContext* aCx)
{
// Get the interface or namespace object for this class. This will
// create the object as needed and always define the properties for
// it on the global. The caller should make sure the interface or
// namespace is exposed on the global before calling this.
return GetPerInterfaceObjectHandle(aCx, constructors::id::TaskController,
&CreateInterfaceObjects,
DefineInterfaceProperty::Always);
}
} // namespace TaskController_Binding
namespace TaskSignal_Binding {
typedef mozilla::dom::TaskSignal NativeType;
bool
ConstructorEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj);
bool
Wrap(JSContext* aCx, mozilla::dom::TaskSignal* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
template <class T>
inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
{
JS::Rooted<JSObject*> reflector(aCx);
return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
}
void
CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, DefineInterfaceProperty aDefineOnGlobal);
JS::Handle<JSObject*>
GetConstructorObjectHandle(JSContext* aCx);
inline bool CreateAndDefineOnGlobal(JSContext* aCx)
{
// Get the interface or namespace object for this class. This will
// create the object as needed and always define the properties for
// it on the global. The caller should make sure the interface or
// namespace is exposed on the global before calling this.
return GetPerInterfaceObjectHandle(aCx, constructors::id::TaskSignal,
&CreateInterfaceObjects,
DefineInterfaceProperty::Always);
}
} // namespace TaskSignal_Binding
} // namespace dom
template <>
struct MaxContiguousEnumValue<dom::TaskPriority>
{
static constexpr dom::TaskPriority value = dom::TaskPriority::Background;
static_assert(static_cast<uint8_t>(dom::TaskPriority::User_blocking) == 0,
"We rely on this in ContiguousEnumValues");
static_assert(std::size(dom::binding_detail::EnumStrings<dom::TaskPriority>::Values) - 1 == UnderlyingValue(value),
"Mismatch between enum strings and enum count");
};
} // namespace mozilla
#endif // DOM_WEBTASKSCHEDULINGBINDING_H_