summaryrefslogtreecommitdiff
path: root/dom/script/ScriptLoader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dom/script/ScriptLoader.cpp')
-rw-r--r--dom/script/ScriptLoader.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/dom/script/ScriptLoader.cpp b/dom/script/ScriptLoader.cpp
index 8058c8caa7..5b7bea8d22 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.