Bug 1593560 - Allow data urls with DocumentChannel. r=nika

Differential Revision: https://phabricator.services.mozilla.com/D51547
This commit is contained in:
Matt Woodrow
2019-11-06 22:37:06 +00:00
parent de86e85ba1
commit 16f0a21197

View File

@@ -9547,8 +9547,8 @@ static bool IsConsideredSameOriginForUIR(nsIPrincipal* aTriggeringPrincipal,
}
static bool SchemeUsesDocChannel(nsIURI* aURI) {
return aURI && (aURI->SchemeIs("http") || aURI->SchemeIs("https") ||
aURI->SchemeIs("moz"));
return SchemeIsHTTP(aURI) || SchemeIsHTTPS(aURI) || aURI->SchemeIs("moz") ||
SchemeIsData(aURI);
}
/* static */ bool nsDocShell::CreateChannelForLoadState(