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

@@ -1106,6 +1106,13 @@ bool ScriptLoader::ProcessInlineScript(nsIScriptElement* aElement,
}
}
{
// We must perform a microtask checkpoint when inserting script elements
// as specified by: https://html.spec.whatwg.org/#parsing-main-incdata
// For the non-inline module cases this happens in ProcessRequest.
mozilla::nsAutoMicroTask mt;
}
nsresult rv = mModuleLoader->ProcessFetchedModuleSource(modReq);
if (NS_FAILED(rv)) {
ReportErrorToConsole(modReq, rv);