diff options
author | Moonchild <moonchild@palemoon.org> | 2020-08-24 11:11:17 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2020-08-30 09:47:49 +0000 |
commit | d58cb8e11b15c054f0773918cd7fd89ce2a7464e (patch) | |
tree | 380d82f3b0ad12222da2338da83408b97b402634 /parser/html/nsHtml5TreeOpExecutor.cpp | |
parent | 429a7bdb93e443236f4a4b04afc9a12c78f54247 (diff) | |
download | UXP-d58cb8e11b15c054f0773918cd7fd89ce2a7464e.tar UXP-d58cb8e11b15c054f0773918cd7fd89ce2a7464e.tar.gz UXP-d58cb8e11b15c054f0773918cd7fd89ce2a7464e.tar.lz UXP-d58cb8e11b15c054f0773918cd7fd89ce2a7464e.tar.xz UXP-d58cb8e11b15c054f0773918cd7fd89ce2a7464e.zip |
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.
Diffstat (limited to 'parser/html/nsHtml5TreeOpExecutor.cpp')
-rw-r--r-- | parser/html/nsHtml5TreeOpExecutor.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
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<nsIURI> uri = ConvertIfNotPreloadedYet(aURL); if (!uri) { return; } mDocument->ScriptLoader()->PreloadURI(uri, aCharset, aType, aCrossOrigin, - aIntegrity, aScriptFromHead, + aIntegrity, aScriptFromHead, aAsync, aDefer, mSpeculationReferrerPolicy); } |