summaryrefslogtreecommitdiffstats
path: root/dom/script/ScriptLoader.h
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2020-08-24 11:11:17 +0000
committerMoonchild <moonchild@palemoon.org>2020-08-24 11:13:16 +0000
commit2ca1cbe2f5e138e7b12b156296a21e47ce0aaedf (patch)
tree4a4b062e0185ea5cfd1a64d25188f9a9b4e056cd /dom/script/ScriptLoader.h
parent95e0f114e2b1eed6142ee51054f7122d520eb8fb (diff)
downloadUXP-2ca1cbe2f5e138e7b12b156296a21e47ce0aaedf.tar
UXP-2ca1cbe2f5e138e7b12b156296a21e47ce0aaedf.tar.gz
UXP-2ca1cbe2f5e138e7b12b156296a21e47ce0aaedf.tar.lz
UXP-2ca1cbe2f5e138e7b12b156296a21e47ce0aaedf.tar.xz
UXP-2ca1cbe2f5e138e7b12b156296a21e47ce0aaedf.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 'dom/script/ScriptLoader.h')
-rw-r--r--dom/script/ScriptLoader.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/dom/script/ScriptLoader.h b/dom/script/ScriptLoader.h
index 61680a3ee..b7e20c7ee 100644
--- a/dom/script/ScriptLoader.h
+++ b/dom/script/ScriptLoader.h
@@ -76,6 +76,8 @@ public:
mHasSourceMapURL(false),
mInDeferList(false),
mInAsyncList(false),
+ mPreloadAsAsync(false),
+ mPreloadAsDefer(false),
mIsNonAsyncScriptInserted(false),
mIsXSLT(false),
mIsCanceled(false),
@@ -161,6 +163,8 @@ public:
bool mHasSourceMapURL; // Does the HTTP header have a source map url?
bool mInDeferList; // True if we live in mDeferRequests.
bool mInAsyncList; // True if we live in mLoadingAsyncRequests or mLoadedAsyncRequests.
+ bool mPreloadAsAsync; // True if this is a preload request and the script is async
+ bool mPreloadAsDefer; // True if this is a preload request and the script is defer
bool mIsNonAsyncScriptInserted; // True if we live in mNonAsyncExternalScriptInsertedRequests
bool mIsXSLT; // True if we live in mXSLTRequests.
bool mIsCanceled; // True if we have been explicitly canceled.
@@ -459,6 +463,8 @@ public:
const nsAString &aCrossOrigin,
const nsAString& aIntegrity,
bool aScriptFromHead,
+ bool aAsync,
+ bool aDefer,
const mozilla::net::ReferrerPolicy aReferrerPolicy);
/**