diff options
Diffstat (limited to 'js/src/jsapi.cpp')
-rw-r--r-- | js/src/jsapi.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/js/src/jsapi.cpp b/js/src/jsapi.cpp index 9c24f1676..cb0851f80 100644 --- a/js/src/jsapi.cpp +++ b/js/src/jsapi.cpp @@ -4740,16 +4740,18 @@ JS::GetModuleScript(JSContext* cx, JS::HandleObject moduleArg) } JS_PUBLIC_API(bool) -JS::IsModuleErrored(JSObject* moduleArg) +JS::IsModuleErrored(JSContext* cx, JSObject* moduleArg) { - AssertHeapIsIdle(); + AssertHeapIsIdle(cx); + CHECK_REQUEST(cx); return moduleArg->as<ModuleObject>().status() == MODULE_STATUS_ERRORED; } JS_PUBLIC_API(JS::Value) -JS::GetModuleError(JSObject* moduleArg) +JS::GetModuleError(JSContext* cx, JSObject* moduleArg) { - AssertHeapIsIdle(); + AssertHeapIsIdle(cx); + CHECK_REQUEST(cx); return moduleArg->as<ModuleObject>().error(); } |