diff options
author | Moonchild <moonchild@palemoon.org> | 2020-07-03 15:59:00 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2020-07-10 18:30:14 +0000 |
commit | 765c90318f192ba18848095133b0531c3162678d (patch) | |
tree | 02c242f12d11b60052cc6ac7f30447d9679e166b /js/src | |
parent | ef8d18da70c2c2efedc5e4db1dca0ece30ac5d14 (diff) | |
download | uxp-765c90318f192ba18848095133b0531c3162678d.tar.gz |
Issue #618 - Fix JSAPI additions to pass the JS context.
Diffstat (limited to 'js/src')
-rw-r--r-- | js/src/jsapi.cpp | 10 | ||||
-rw-r--r-- | js/src/jsapi.h | 4 |
2 files changed, 8 insertions, 6 deletions
diff --git a/js/src/jsapi.cpp b/js/src/jsapi.cpp index 9c24f1676c..cb0851f80b 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(); } diff --git a/js/src/jsapi.h b/js/src/jsapi.h index 9c3bf81518..6d306edc56 100644 --- a/js/src/jsapi.h +++ b/js/src/jsapi.h @@ -4396,10 +4396,10 @@ extern JS_PUBLIC_API(JSScript*) GetModuleScript(JSContext* cx, JS::HandleObject moduleRecord); extern JS_PUBLIC_API(bool) -IsModuleErrored(JSObject* moduleRecord); +IsModuleErrored(JSContext* cx, JSObject* moduleRecord); extern JS_PUBLIC_API(JS::Value) -GetModuleError(JSObject* moduleRecord); +GetModuleError(JSContext* cx, JSObject* moduleRecord); } /* namespace JS */ |