diff options
Diffstat (limited to 'js/src/jsapi.h')
-rw-r--r-- | js/src/jsapi.h | 25 |
1 files changed, 6 insertions, 19 deletions
diff --git a/js/src/jsapi.h b/js/src/jsapi.h index 82477f9a7..f8203ee1f 100644 --- a/js/src/jsapi.h +++ b/js/src/jsapi.h @@ -4324,7 +4324,7 @@ extern JS_PUBLIC_API(bool) Evaluate(JSContext* cx, const ReadOnlyCompileOptions& options, const char* filename, JS::MutableHandleValue rval); -using ModuleResolveHook = JSObject* (*)(JSContext*, HandleValue, HandleString); +using ModuleResolveHook = JSObject* (*)(JSContext*, HandleObject, HandleString); /** * Get the HostResolveImportedModule hook for the runtime. @@ -4347,30 +4347,17 @@ CompileModule(JSContext* cx, const ReadOnlyCompileOptions& options, SourceBufferHolder& srcBuf, JS::MutableHandleObject moduleRecord); /** - * Set a private value associated with a source text module record. + * Set the [[HostDefined]] field of a source text module record to the given + * value. */ extern JS_PUBLIC_API(void) -SetModulePrivate(JSObject* module, const JS::Value& value); +SetModuleHostDefinedField(JSObject* module, const JS::Value& value); /** - * Get the private value associated with a source text module record. + * Get the [[HostDefined]] field of a source text module record. */ extern JS_PUBLIC_API(JS::Value) -GetModulePrivate(JSObject* module); - -/** - * Set a private value associated with a script. Note that this value is shared - * by all nested scripts compiled from a single source file. - */ -extern JS_PUBLIC_API(void) -SetScriptPrivate(JSScript* script, const JS::Value& value); - -/** - * Get the private value associated with a script. Note that this value is - * shared by all nested scripts compiled from a single source file. - */ -extern JS_PUBLIC_API(JS::Value) -GetScriptPrivate(JSScript* script); +GetModuleHostDefinedField(JSObject* module); /* * Perform the ModuleInstantiate operation on the given source text module |