summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2020-07-29 11:55:30 +0000
committerMoonchild <moonchild@palemoon.org>2020-07-29 11:55:30 +0000
commite655ce397db3085a135f88b18dada46fd8e82a17 (patch)
tree1c56dfbaf1631cdcdcb5c3606ed37a6a15d8cfcd
parent572e7502b18cf277b9c91257338f3bc42b8c709d (diff)
downloadUXP-e655ce397db3085a135f88b18dada46fd8e82a17.tar
UXP-e655ce397db3085a135f88b18dada46fd8e82a17.tar.gz
UXP-e655ce397db3085a135f88b18dada46fd8e82a17.tar.lz
UXP-e655ce397db3085a135f88b18dada46fd8e82a17.tar.xz
UXP-e655ce397db3085a135f88b18dada46fd8e82a17.zip
[dom] Fix a spec compliance issue with the HTML LS regarding script loading.
This fixes a spec compliance issue with section 8.1.4.2 Fetching scripts.
-rw-r--r--dom/workers/ScriptLoader.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/dom/workers/ScriptLoader.cpp b/dom/workers/ScriptLoader.cpp
index 80e136384..8f2023609 100644
--- a/dom/workers/ScriptLoader.cpp
+++ b/dom/workers/ScriptLoader.cpp
@@ -1101,14 +1101,16 @@ private:
rv = NS_GetFinalChannelURI(channel, getter_AddRefs(finalURI));
NS_ENSURE_SUCCESS(rv, rv);
- nsCString filename;
- rv = finalURI->GetSpec(filename);
- NS_ENSURE_SUCCESS(rv, rv);
+ if (principal->Subsumes(channelPrincipal)) {
+ nsCString filename;
+ rv = finalURI->GetSpec(filename);
+ NS_ENSURE_SUCCESS(rv, rv);
- if (!filename.IsEmpty()) {
- // This will help callers figure out what their script url resolved to in
- // case of errors.
- aLoadInfo.mURL.Assign(NS_ConvertUTF8toUTF16(filename));
+ if (!filename.IsEmpty()) {
+ // This will help callers figure out what their script url resolved to in
+ // case of errors.
+ aLoadInfo.mURL.Assign(NS_ConvertUTF8toUTF16(filename));
+ }
}
nsCOMPtr<nsILoadInfo> chanLoadInfo = channel->GetLoadInfo();