Bug 1632975 - Run microtask checkpoint before processing script. r=smaug

Differential Revision: https://phabricator.services.mozilla.com/D162261
This commit is contained in:
Adam Vandolder
2022-11-17 20:11:23 +00:00
parent 907a169e67
commit de848dc97f
4 changed files with 58 additions and 7 deletions

View File

@@ -1186,13 +1186,6 @@ 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;
}
// This calls OnFetchComplete directly since there's no need to start
// fetching an inline script.
nsresult rv = modReq->OnFetchComplete(NS_OK);