summaryrefslogtreecommitdiffstats
path: root/docshell/base/nsDocShell.cpp
diff options
context:
space:
mode:
authorjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-04-30 22:57:23 +0200
committerjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-04-30 22:57:23 +0200
commit74858918fa2445f7e4ebc4b615ec073d528039f1 (patch)
tree1ac596813ae2b6ab87488e04bdbda98d9d070b0d /docshell/base/nsDocShell.cpp
parent80edefc958f4216bb5982e48a58fd241c69a54db (diff)
downloadUXP-74858918fa2445f7e4ebc4b615ec073d528039f1.tar
UXP-74858918fa2445f7e4ebc4b615ec073d528039f1.tar.gz
UXP-74858918fa2445f7e4ebc4b615ec073d528039f1.tar.lz
UXP-74858918fa2445f7e4ebc4b615ec073d528039f1.tar.xz
UXP-74858918fa2445f7e4ebc4b615ec073d528039f1.zip
Bug 1329032 - Extend loadURIWithOptions by a triggeringPrincipal (without an hard e10s)
Diffstat (limited to 'docshell/base/nsDocShell.cpp')
-rw-r--r--docshell/base/nsDocShell.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp
index d67941620..d7cb557ab 100644
--- a/docshell/base/nsDocShell.cpp
+++ b/docshell/base/nsDocShell.cpp
@@ -4732,7 +4732,7 @@ nsDocShell::LoadURI(const char16_t* aURI,
{
return LoadURIWithOptions(aURI, aLoadFlags, aReferringURI,
mozilla::net::RP_Default, aPostStream,
- aHeaderStream, nullptr);
+ aHeaderStream, nullptr, nullptr);
}
NS_IMETHODIMP
@@ -4742,7 +4742,8 @@ nsDocShell::LoadURIWithOptions(const char16_t* aURI,
uint32_t aReferrerPolicy,
nsIInputStream* aPostStream,
nsIInputStream* aHeaderStream,
- nsIURI* aBaseURI)
+ nsIURI* aBaseURI,
+ nsIPrincipal* aTriggeringPrincipal)
{
NS_ASSERTION((aLoadFlags & 0xf) == 0, "Unexpected flags");
@@ -4861,6 +4862,7 @@ nsDocShell::LoadURIWithOptions(const char16_t* aURI,
loadInfo->SetReferrerPolicy(aReferrerPolicy);
loadInfo->SetHeadersStream(aHeaderStream);
loadInfo->SetBaseURI(aBaseURI);
+ loadInfo->SetTriggeringPrincipal(aTriggeringPrincipal);
loadInfo->SetForceAllowDataURI(forceAllowDataURI);
if (fixupInfo) {
@@ -10606,7 +10608,7 @@ nsDocShell::InternalLoad(nsIURI* aURI,
}
bool shouldLoad;
rv = browserChrome3->ShouldLoadURI(this, uriForShouldLoadCheck, aReferrer,
- &shouldLoad);
+ aTriggeringPrincipal, &shouldLoad);
if (NS_SUCCEEDED(rv) && !shouldLoad) {
return NS_OK;
}