Bug 1759881 - Part 5: Remove microtask checkpoints from the module loader in couple of places r=smaug

This removes the microtask checkpoint when instantiating modules and moves the
one when creating a module script to the the script loader.

Differential Revision: https://phabricator.services.mozilla.com/D141252
This commit is contained in:
Jon Coppeard
2022-03-17 15:22:18 +00:00
parent c85786b862
commit 1b4dec7136
3 changed files with 7 additions and 5 deletions

View File

@@ -241,8 +241,6 @@ nsresult ModuleLoaderBase::CreateModuleScript(ModuleLoadRequest* aRequest) {
return NS_ERROR_FAILURE;
}
mozilla::nsAutoMicroTask mt;
mozilla::dom::AutoJSAPI jsapi;
if (!jsapi.Init(globalObject)) {
return NS_ERROR_FAILURE;
@@ -688,7 +686,6 @@ bool ModuleLoaderBase::InstantiateModuleTree(ModuleLoadRequest* aRequest) {
MOZ_ASSERT(moduleScript->ModuleRecord());
mozilla::nsAutoMicroTask mt;
mozilla::dom::AutoJSAPI jsapi;
if (NS_WARN_IF(!jsapi.Init(moduleScript->ModuleRecord()))) {
return false;