Bug 1842798 - Part 3: Complete dynamic imports asynchronously with a microtask r...
commit19409077f2063050859f498bfe41214311a9129c
authorJon Coppeard <jcoppeard@mozilla.com>
Thu, 3 Aug 2023 08:15:29 +0000 (3 08:15 +0000)
committerJon Coppeard <jcoppeard@mozilla.com>
Thu, 3 Aug 2023 08:15:29 +0000 (3 08:15 +0000)
tree9a4250c0a16501c7e0074d01e4e8791ed48e3424
parent85b88021dfcf43a84ec4e31abbeaf66232152a9b
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