summaryrefslogtreecommitdiffstats
path: root/js/src/jsapi.h
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2020-08-31 05:54:39 +0000
committerMoonchild <moonchild@palemoon.org>2020-08-31 05:54:39 +0000
commita6f632714fcb1be3dd00b0fc76fbf6bfc693155b (patch)
treeb04c82f9af4a0d288a6d4350d774ad8fe6dac903 /js/src/jsapi.h
parent2ed0607c747b21cadaf7401d4ba706097578e74d (diff)
parentb28effe2ea93e43e362f7ce263d23b55adcb6da7 (diff)
downloadUXP-a6f632714fcb1be3dd00b0fc76fbf6bfc693155b.tar
UXP-a6f632714fcb1be3dd00b0fc76fbf6bfc693155b.tar.gz
UXP-a6f632714fcb1be3dd00b0fc76fbf6bfc693155b.tar.lz
UXP-a6f632714fcb1be3dd00b0fc76fbf6bfc693155b.tar.xz
UXP-a6f632714fcb1be3dd00b0fc76fbf6bfc693155b.zip
Merge branch 'redwood' into releaseRELBASE_20200831
Diffstat (limited to 'js/src/jsapi.h')
-rw-r--r--js/src/jsapi.h21
1 files changed, 10 insertions, 11 deletions
diff --git a/js/src/jsapi.h b/js/src/jsapi.h
index 9c3bf8151..5cdfd958e 100644
--- a/js/src/jsapi.h
+++ b/js/src/jsapi.h
@@ -995,6 +995,9 @@ JS_NewContext(uint32_t maxbytes,
extern JS_PUBLIC_API(void)
JS_DestroyContext(JSContext* cx);
+extern JS_PUBLIC_API(JSRuntime*)
+JS_GetRuntime(JSContext* cx);
+
typedef double (*JS_CurrentEmbedderTimeFunction)();
/**
@@ -4322,17 +4325,19 @@ extern JS_PUBLIC_API(bool)
Evaluate(JSContext* cx, const ReadOnlyCompileOptions& options,
const char* filename, JS::MutableHandleValue rval);
+using ModuleResolveHook = JSObject* (*)(JSContext*, HandleObject, HandleString);
+
/**
- * Get the HostResolveImportedModule hook for a global.
+ * Get the HostResolveImportedModule hook for the runtime.
*/
-extern JS_PUBLIC_API(JSFunction*)
-GetModuleResolveHook(JSContext* cx);
+extern JS_PUBLIC_API(ModuleResolveHook)
+GetModuleResolveHook(JSRuntime* rt);
/**
- * Set the HostResolveImportedModule hook for a global to the given function.
+ * Set the HostResolveImportedModule hook for the runtime to the given function.
*/
extern JS_PUBLIC_API(void)
-SetModuleResolveHook(JSContext* cx, JS::HandleFunction func);
+SetModuleResolveHook(JSRuntime* rt, ModuleResolveHook func);
/**
* Parse the given source buffer as a module in the scope of the current global
@@ -4395,12 +4400,6 @@ GetRequestedModules(JSContext* cx, JS::HandleObject moduleRecord);
extern JS_PUBLIC_API(JSScript*)
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 */
extern JS_PUBLIC_API(bool)