Bug 1053321 - Correctly pass info about 'defer' and 'async' attributes to HTML5 parser invoked script preload. r=bkelly

This commit is contained in:
Honza Bambas
2017-08-19 05:35:00 -04:00
parent ec379247b8
commit 454794c9eb
12 changed files with 145 additions and 18 deletions

View File

@@ -951,14 +951,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);
}