Bug 1842798 - Part 3: Complete dynamic imports asynchronously with a microtask r...
commitdc4791f4d9dd4e676e3cde8666506a59689f92bc
authorJon Coppeard <jcoppeard@mozilla.com>
Wed, 2 Aug 2023 09:34:39 +0000 (2 09:34 +0000)
committerJon Coppeard <jcoppeard@mozilla.com>
Wed, 2 Aug 2023 09:34:39 +0000 (2 09:34 +0000)
tree82c6c240f02a7b0c0c67f586f718fc9d9ab91e11
parent737882912072989646bcea116f91fa2cd7c8e0ae
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