Bug 1842798 - Part 3: Complete dynamic imports asynchronously with a microtask r...
commitb74ed7afebae08bfc6d4c0867466bafcdb985757
authorJon Coppeard <jcoppeard@mozilla.com>
Wed, 2 Aug 2023 14:39:33 +0000 (2 14:39 +0000)
committerJon Coppeard <jcoppeard@mozilla.com>
Wed, 2 Aug 2023 14:39:33 +0000 (2 14:39 +0000)
tree13117a5bf2cd4a07f3f531f9fef815300ebb5a4c
parentafcabcef1150e4bc356e7a20996edb0816346881
Bug 1842798 - Part 3: Complete dynamic imports asynchronously with a microtask r=smaug

According to the spec this should happen as the result of resolving a promise
(see ContinueDynamicImport). If this happens synchronously it's possible for
the importing module to still be in the evaluating state when trying to
instantiate and evaluate the dynamically imported module which breaks the
module loader invariants.

Differential Revision: https://phabricator.services.mozilla.com/D183876
js/loader/ModuleLoaderBase.cpp
js/loader/ModuleLoaderBase.h