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 /dom/script/ScriptLoader.cpp | |
parent | 15914ec5780e7867ab508a48a83311c56950f8a9 (diff) | |
download | UXP-060e3eb0c8163698b52d59e333d9c4496c78a2c2.tar UXP-060e3eb0c8163698b52d59e333d9c4496c78a2c2.tar.gz UXP-060e3eb0c8163698b52d59e333d9c4496c78a2c2.tar.lz UXP-060e3eb0c8163698b52d59e333d9c4496c78a2c2.tar.xz UXP-060e3eb0c8163698b52d59e333d9c4496c78a2c2.zip |
Revert "Issue #1691 - Part 1: Provide a way of associating a private value with a script"
This reverts commit 15914ec5780e7867ab508a48a83311c56950f8a9.
Diffstat (limited to 'dom/script/ScriptLoader.cpp')
-rw-r--r-- | dom/script/ScriptLoader.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/dom/script/ScriptLoader.cpp b/dom/script/ScriptLoader.cpp index 8058c8caa..5b7bea8d2 100644 --- a/dom/script/ScriptLoader.cpp +++ b/dom/script/ScriptLoader.cpp @@ -798,13 +798,13 @@ ScriptLoader::StartFetchingModuleAndDependencies(ModuleLoadRequest* aParent, // 8.1.3.8.1 HostResolveImportedModule(referencingModule, specifier) JSObject* -HostResolveImportedModule(JSContext* aCx, - JS::Handle<JS::Value> aReferencingPrivate, +HostResolveImportedModule(JSContext* aCx, JS::Handle<JSObject*> aModule, JS::Handle<JSString*> aSpecifier) { // Let referencing module script be referencingModule.[[HostDefined]]. - auto script = static_cast<ModuleScript*>(aReferencingPrivate.toPrivate()); - MOZ_ASSERT(JS::GetModulePrivate(script->ModuleRecord()) == aReferencingPrivate); + JS::Value value = JS::GetModuleHostDefinedField(aModule); + auto script = static_cast<ModuleScript*>(value.toPrivate()); + MOZ_ASSERT(script->ModuleRecord() == aModule); // Let url be the result of resolving a module specifier given referencing // module script and specifier. |