diff options
Diffstat (limited to 'js/src/jsapi.cpp')
-rw-r--r-- | js/src/jsapi.cpp | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/js/src/jsapi.cpp b/js/src/jsapi.cpp index 74d64e312e..dab4c25a43 100644 --- a/js/src/jsapi.cpp +++ b/js/src/jsapi.cpp @@ -4691,27 +4691,15 @@ JS::CompileModule(JSContext* cx, const ReadOnlyCompileOptions& options, } JS_PUBLIC_API(void) -JS::SetModulePrivate(JSObject* module, const JS::Value& value) +JS::SetModuleHostDefinedField(JSObject* module, const JS::Value& value) { - module->as<ModuleObject>().scriptSourceObject()->setPrivate(value); + module->as<ModuleObject>().setHostDefinedField(value); } JS_PUBLIC_API(JS::Value) -JS::GetModulePrivate(JSObject* module) +JS::GetModuleHostDefinedField(JSObject* module) { - return module->as<ModuleObject>().scriptSourceObject()->getPrivate(); -} - -JS_PUBLIC_API(void) -JS::SetScriptPrivate(JSScript* script, const JS::Value& value) -{ - script->scriptSourceUnwrap().setPrivate(value); -} - -JS_PUBLIC_API(JS::Value) -JS::GetScriptPrivate(JSScript* script) -{ - return script->scriptSourceUnwrap().getPrivate(); + return module->as<ModuleObject>().hostDefinedField(); } JS_PUBLIC_API(bool) |