Issue #1691 - Part 1: Provide a way of associating a private value with a script or module.

This is a prerequisite for dynamic import

(cherry picked from commit 2e2972647ee29340df51a804f05e40fc1da2c89b)
This commit is contained in:
Brian Smith 2023-04-08 03:26:10 -05:00 committed by roytam1
commit 1a6b3a822c
10 changed files with 129 additions and 43 deletions

View file

@ -2006,7 +2006,8 @@ intrinsic_HostResolveImportedModule(JSContext* cx, unsigned argc, Value* vp)
}
RootedObject result(cx);
result = moduleResolveHook(cx, module, specifier);
RootedValue referencingPrivate(cx, JS::GetModulePrivate(module));
result = moduleResolveHook(cx, referencingPrivate, specifier);
if (!result)
return false;