mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-28 18:17:29 +09:00
parent
7b30bfee4c
commit
5838eded5f
2 changed files with 20 additions and 0 deletions
|
|
@ -4739,6 +4739,20 @@ JS::GetModuleScript(JSContext* cx, JS::HandleObject moduleArg)
|
||||||
return moduleArg->as<ModuleObject>().script();
|
return moduleArg->as<ModuleObject>().script();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
JS_PUBLIC_API(bool)
|
||||||
|
JS::IsModuleErrored(JSObject* moduleArg)
|
||||||
|
{
|
||||||
|
AssertHeapIsIdle();
|
||||||
|
return moduleArg->as<ModuleObject>().status() == MODULE_STATUS_ERRORED;
|
||||||
|
}
|
||||||
|
|
||||||
|
JS_PUBLIC_API(JS::Value)
|
||||||
|
JS::GetModuleError(JSObject* moduleArg)
|
||||||
|
{
|
||||||
|
AssertHeapIsIdle();
|
||||||
|
return moduleArg->as<ModuleObject>().error();
|
||||||
|
}
|
||||||
|
|
||||||
JS_PUBLIC_API(JSObject*)
|
JS_PUBLIC_API(JSObject*)
|
||||||
JS_New(JSContext* cx, HandleObject ctor, const JS::HandleValueArray& inputArgs)
|
JS_New(JSContext* cx, HandleObject ctor, const JS::HandleValueArray& inputArgs)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -4396,6 +4396,12 @@ GetRequestedModules(JSContext* cx, JS::HandleObject moduleRecord);
|
||||||
extern JS_PUBLIC_API(JSScript*)
|
extern JS_PUBLIC_API(JSScript*)
|
||||||
GetModuleScript(JSContext* cx, JS::HandleObject moduleRecord);
|
GetModuleScript(JSContext* cx, JS::HandleObject moduleRecord);
|
||||||
|
|
||||||
|
extern JS_PUBLIC_API(bool)
|
||||||
|
IsModuleErrored(JSObject* moduleRecord);
|
||||||
|
|
||||||
|
extern JS_PUBLIC_API(JS::Value)
|
||||||
|
GetModuleError(JSObject* moduleRecord);
|
||||||
|
|
||||||
} /* namespace JS */
|
} /* namespace JS */
|
||||||
|
|
||||||
extern JS_PUBLIC_API(bool)
|
extern JS_PUBLIC_API(bool)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue