mirror of
https://github.com/ManchildProductions/UXP-Fixed.git
synced 2026-05-27 05:40:47 +00:00
Issue #618 - Don't preload nomodule scripts when modules are enabled
Ref: BZ 1382020
This commit is contained in:
@@ -2576,13 +2576,15 @@ ScriptLoader::ParsingComplete(bool aTerminated)
|
||||
}
|
||||
|
||||
void
|
||||
ScriptLoader::PreloadURI(nsIURI *aURI, const nsAString &aCharset,
|
||||
ScriptLoader::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)
|
||||
{
|
||||
NS_ENSURE_TRUE_VOID(mDocument);
|
||||
@@ -2591,9 +2593,16 @@ ScriptLoader::PreloadURI(nsIURI *aURI, const nsAString &aCharset,
|
||||
return;
|
||||
}
|
||||
|
||||
// TODO: Preload module scripts.
|
||||
if (mDocument->ModuleScriptsEnabled() && aType.LowerCaseEqualsASCII("module")) {
|
||||
return;
|
||||
if (mDocument->ModuleScriptsEnabled()) {
|
||||
// Don't load nomodule scripts.
|
||||
if (aNoModule) {
|
||||
return;
|
||||
}
|
||||
|
||||
// TODO: Preload module scripts.
|
||||
if (aType.LowerCaseEqualsASCII("module")) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
SRIMetadata sriMetadata;
|
||||
|
||||
Reference in New Issue
Block a user