summaryrefslogtreecommitdiffstats
path: root/dom/base/ThirdPartyUtil.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dom/base/ThirdPartyUtil.cpp')
-rw-r--r--dom/base/ThirdPartyUtil.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/dom/base/ThirdPartyUtil.cpp b/dom/base/ThirdPartyUtil.cpp
index 2c71ab3d94..0ced8aa7d8 100644
--- a/dom/base/ThirdPartyUtil.cpp
+++ b/dom/base/ThirdPartyUtil.cpp
@@ -200,9 +200,9 @@ ThirdPartyUtil::IsThirdPartyWindow(mozIDOMWindowProxy* aWindow, nsIURI* aURI,
bool result;
- // Ignore about:blank URIs here since they have no domain and attempting to
- // compare against them will fail.
- if (aURI && !NS_IsAboutBlank(aURI)) {
+ // Ignore about:blank and about:srcdoc URIs here since they have no domain
+ // and attempting to compare against them will fail.
+ if (aURI && !NS_IsAboutBlank(aURI) && !NS_IsAboutSrcdoc(aURI)) {
nsCOMPtr<nsIPrincipal> prin;
nsresult rv = GetPrincipalFromWindow(aWindow, getter_AddRefs(prin));
NS_ENSURE_SUCCESS(rv, rv);
@@ -320,10 +320,10 @@ ThirdPartyUtil::IsThirdPartyChannel(nsIChannel* aChannel, nsIURI* aURI,
}
}
- // Special consideration must be done for about:blank URIs because those
- // inherit the principal from the parent context. For them, let's consider the
- // principal URI.
- if (NS_IsAboutBlank(channelURI)) {
+ // Special consideration must be done for about:blank and about:srcdoc URIs
+ // because those inherit the principal from the parent context. For them,
+ // let's consider the principal URI.
+ if (NS_IsAboutBlank(channelURI) || NS_IsAboutSrcdoc(channelURI)) {
nsCOMPtr<nsIPrincipal> principalToInherit =
loadInfo->FindPrincipalToInherit(aChannel);
if (!principalToInherit) {