summaryrefslogtreecommitdiffstats
path: root/dom/script/ScriptLoader.h
diff options
context:
space:
mode:
Diffstat (limited to 'dom/script/ScriptLoader.h')
-rw-r--r--dom/script/ScriptLoader.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/dom/script/ScriptLoader.h b/dom/script/ScriptLoader.h
index ed1e6acbc..73f2a9258 100644
--- a/dom/script/ScriptLoader.h
+++ b/dom/script/ScriptLoader.h
@@ -173,6 +173,12 @@ public:
return mScriptMode == ScriptMode::eAsync;
}
+ virtual bool IsTopLevel() const
+ {
+ // Classic scripts are always top level.
+ return true;
+ }
+
void MaybeCancelOffThreadScript();
using super::getNext;
@@ -479,13 +485,15 @@ public:
* @param aIntegrity The expect hash url, if avail, of the request
* @param aScriptFromHead Whether or not the script was a child of head
*/
- virtual void PreloadURI(nsIURI *aURI, const nsAString &aCharset,
+ virtual void PreloadURI(nsIURI *aURI,
+ const nsAString &aCharset,
const nsAString &aType,
const nsAString &aCrossOrigin,
const nsAString& aIntegrity,
bool aScriptFromHead,
bool aAsync,
bool aDefer,
+ bool aNoModule,
const mozilla::net::ReferrerPolicy aReferrerPolicy);
/**
@@ -498,6 +506,12 @@ public:
return mPendingChildLoaders.AppendElement(aChild) != nullptr;
}
+ /*
+ * Clear the map of loaded modules. Called when a Document object is reused
+ * for a different global.
+ */
+ void ClearModuleMap();
+
private:
virtual ~ScriptLoader();