Issue #1691 - Part 4: Finish implementing call import. https://bugzilla.mozilla.org/show_bug.cgi?id=1499140

(cherry picked from commit 7bf7d64887944b127a72090dd62eb57f67c5089d)
This commit is contained in:
Brian Smith 2023-04-09 03:06:39 -05:00 committed by roytam1
commit 7a6dab0b38
35 changed files with 533 additions and 24 deletions

View file

@ -4201,6 +4201,22 @@ CASE(JSOP_IMPORTMETA)
}
END_CASE(JSOP_IMPORTMETA)
CASE(JSOP_DYNAMIC_IMPORT)
{
ReservedRooted<Value> referencingPrivate(&rootValue0);
referencingPrivate = FindScriptOrModulePrivateForScript(script);
ReservedRooted<Value> specifier(&rootValue1);
POP_COPY_TO(specifier);
JSObject* promise = StartDynamicModuleImport(cx, referencingPrivate, specifier);
if (!promise)
goto error;
PUSH_OBJECT(*promise);
}
END_CASE(JSOP_DYNAMIC_IMPORT)
CASE(JSOP_SUPERFUN)
{
ReservedRooted<JSObject*> superEnvFunc(&rootObject0, &GetSuperEnvFunction(cx, REGS));