diff options
author | Moonchild <moonchild@palemoon.org> | 2020-11-28 10:18:10 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2020-11-28 10:18:10 +0000 |
commit | 060e3eb0c8163698b52d59e333d9c4496c78a2c2 (patch) | |
tree | 7f23ae89939b79400774643c0e7a658b0ce7cb36 /js/src/jsapi.h | |
parent | 15914ec5780e7867ab508a48a83311c56950f8a9 (diff) | |
download | uxp-060e3eb0c8163698b52d59e333d9c4496c78a2c2.tar.gz |
Revert "Issue #1691 - Part 1: Provide a way of associating a private value with a script"
This reverts commit 15914ec5780e7867ab508a48a83311c56950f8a9.
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 82477f9a7e..f8203ee1fd 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 |