mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-08-28 18:28:38 +09:00
Issue #618 - Remove context and heap-idle check
For checking if a module is in an error state and what the error is, it shouldn't matter if we are currently GC-ing or not. So we don't need to check for it, which removes the requirement to pass in the JS context (needed for AssertHeapIsIdle's runtime check); this unblocks progress where otherwise we'd have to figure out what the context is at the module level just to satisfy this check.
This commit is contained in:
parent
a754a7be26
commit
c65ca2ca58
2 changed files with 4 additions and 8 deletions
|
|
@ -4740,18 +4740,14 @@ JS::GetModuleScript(JSContext* cx, JS::HandleObject moduleArg)
|
|||
}
|
||||
|
||||
JS_PUBLIC_API(bool)
|
||||
JS::IsModuleErrored(JSContext* cx, JSObject* moduleArg)
|
||||
JS::IsModuleErrored(JSObject* moduleArg)
|
||||
{
|
||||
AssertHeapIsIdle(cx);
|
||||
CHECK_REQUEST(cx);
|
||||
return moduleArg->as<ModuleObject>().status() == MODULE_STATUS_ERRORED;
|
||||
}
|
||||
|
||||
JS_PUBLIC_API(JS::Value)
|
||||
JS::GetModuleError(JSContext* cx, JSObject* moduleArg)
|
||||
JS::GetModuleError(JSObject* moduleArg)
|
||||
{
|
||||
AssertHeapIsIdle(cx);
|
||||
CHECK_REQUEST(cx);
|
||||
return moduleArg->as<ModuleObject>().error();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue