From d58cb8e11b15c054f0773918cd7fd89ce2a7464e Mon Sep 17 00:00:00 2001 From: Moonchild Date: Mon, 24 Aug 2020 11:11:17 +0000 Subject: Issue #618 - (async, preload) Correctly pass info about async/defer to parser. This makes sure we don't block body-referred sub-resources by head-referenced defer and async scripts. This is important for all script loads, not just modules, but is added here because it was run into while implementing modules. --- parser/html/nsHtml5TreeOpExecutor.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'parser/html/nsHtml5TreeOpExecutor.cpp') diff --git a/parser/html/nsHtml5TreeOpExecutor.cpp b/parser/html/nsHtml5TreeOpExecutor.cpp index 3ed634d0c..9be7f3b0d 100644 --- a/parser/html/nsHtml5TreeOpExecutor.cpp +++ b/parser/html/nsHtml5TreeOpExecutor.cpp @@ -921,14 +921,16 @@ nsHtml5TreeOpExecutor::PreloadScript(const nsAString& aURL, const nsAString& aType, const nsAString& aCrossOrigin, const nsAString& aIntegrity, - bool aScriptFromHead) + bool aScriptFromHead, + bool aAsync, + bool aDefer) { nsCOMPtr uri = ConvertIfNotPreloadedYet(aURL); if (!uri) { return; } mDocument->ScriptLoader()->PreloadURI(uri, aCharset, aType, aCrossOrigin, - aIntegrity, aScriptFromHead, + aIntegrity, aScriptFromHead, aAsync, aDefer, mSpeculationReferrerPolicy); } -- cgit v1.2.3