diff options
Diffstat (limited to 'js/src/jsapi.h')
-rw-r--r-- | js/src/jsapi.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/js/src/jsapi.h b/js/src/jsapi.h index c6299e3f5..5cdfd958e 100644 --- a/js/src/jsapi.h +++ b/js/src/jsapi.h @@ -4325,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 |