import from UXP: Issue #618 - (async, preload) Correctly pass info about async/defer to parser. (3fa4aabf)

This commit is contained in:
2022-04-15 23:50:17 +08:00
parent 83c01dc5fe
commit f4d609a938
7 changed files with 53 additions and 15 deletions
+4 -2
View File
@@ -923,14 +923,16 @@ nsHtml5TreeOpExecutor::PreloadScript(const nsAString& aURL,
const nsAString& aType,
const nsAString& aCrossOrigin,
const nsAString& aIntegrity,
bool aScriptFromHead)
bool aScriptFromHead,
bool aAsync,
bool aDefer)
{
nsCOMPtr<nsIURI> uri = ConvertIfNotPreloadedYet(aURL);
if (!uri) {
return;
}
mDocument->ScriptLoader()->PreloadURI(uri, aCharset, aType, aCrossOrigin,
aIntegrity, aScriptFromHead,
aIntegrity, aScriptFromHead, aAsync, aDefer,
mSpeculationReferrerPolicy);
}