summaryrefslogtreecommitdiffstats
path: root/js/src/jsapi.cpp
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2020-07-04 12:59:38 +0000
committerMoonchild <moonchild@palemoon.org>2020-07-10 18:30:39 +0000
commit40aad1a2209607b973170f4fb64548e5d8103402 (patch)
tree297fcf9b8cd836436393f612e84bf843aa0da1b6 /js/src/jsapi.cpp
parent1e14031a5940f6846f6ecce1b3c889b6a3d9b67a (diff)
downloadUXP-40aad1a2209607b973170f4fb64548e5d8103402.tar
UXP-40aad1a2209607b973170f4fb64548e5d8103402.tar.gz
UXP-40aad1a2209607b973170f4fb64548e5d8103402.tar.lz
UXP-40aad1a2209607b973170f4fb64548e5d8103402.tar.xz
UXP-40aad1a2209607b973170f4fb64548e5d8103402.zip
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.
Diffstat (limited to 'js/src/jsapi.cpp')
-rw-r--r--js/src/jsapi.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/js/src/jsapi.cpp b/js/src/jsapi.cpp
index cb0851f80..cf5880e03 100644
--- a/js/src/jsapi.cpp
+++ b/js/src/jsapi.cpp
@@ -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();
}