summaryrefslogtreecommitdiffstats
path: root/browser/base/content/browser.js
diff options
context:
space:
mode:
authorjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-05-01 00:22:01 +0200
committerjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-05-01 00:22:01 +0200
commitcc4036a9cd56d504667c07fe215e61b22ab0e1f4 (patch)
tree5c7dea17ce684c1cce57011ef487370c22d0e677 /browser/base/content/browser.js
parent855f11d8f6789bcf10442f8e426bfc1f66bf834d (diff)
downloadUXP-cc4036a9cd56d504667c07fe215e61b22ab0e1f4.tar
UXP-cc4036a9cd56d504667c07fe215e61b22ab0e1f4.tar.gz
UXP-cc4036a9cd56d504667c07fe215e61b22ab0e1f4.tar.lz
UXP-cc4036a9cd56d504667c07fe215e61b22ab0e1f4.tar.xz
UXP-cc4036a9cd56d504667c07fe215e61b22ab0e1f4.zip
Bug 1344706 - Do not reuse originPrincipal as triggeringPrincipal within utilityOverlay.js
Diffstat (limited to 'browser/base/content/browser.js')
-rwxr-xr-xbrowser/base/content/browser.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js
index 0349ce401..2380f5d21 100755
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -1172,6 +1172,7 @@ var gBrowserInit = {
// [5]: referrerPolicy (int)
// [6]: userContextId (int)
// [7]: originPrincipal (nsIPrincipal)
+ // [8]: triggeringPrincipal (nsIPrincipal)
else if (window.arguments.length >= 3) {
let referrerURI = window.arguments[2];
if (typeof(referrerURI) == "string") {
@@ -1189,7 +1190,7 @@ var gBrowserInit = {
window.arguments[4] || false, referrerPolicy, userContextId,
// pass the origin principal (if any) and force its use to create
// an initial about:blank viewer if present:
- window.arguments[7], !!window.arguments[7]);
+ window.arguments[7], !!window.arguments[7], window.arguments[8]);
window.focus();
}
// Note: loadOneOrMoreURIs *must not* be called if window.arguments.length >= 3.
@@ -2075,7 +2076,8 @@ function BrowserTryToCloseWindow()
}
function loadURI(uri, referrer, postData, allowThirdPartyFixup, referrerPolicy,
- userContextId, originPrincipal, forceAboutBlankViewerInCurrent) {
+ userContextId, originPrincipal, forceAboutBlankViewerInCurrent,
+ triggeringPrincipal) {
try {
openLinkIn(uri, "current",
{ referrerURI: referrer,
@@ -2084,6 +2086,7 @@ function loadURI(uri, referrer, postData, allowThirdPartyFixup, referrerPolicy,
allowThirdPartyFixup: allowThirdPartyFixup,
userContextId: userContextId,
originPrincipal,
+ triggeringPrincipal,
forceAboutBlankViewerInCurrent,
});
} catch (e) {}
@@ -5551,6 +5554,7 @@ function handleLinkClick(event, href, linkNode) {
referrerPolicy: referrerPolicy,
noReferrer: BrowserUtils.linkHasNoReferrer(linkNode),
originPrincipal: doc.nodePrincipal,
+ triggeringPrincipal: doc.nodePrincipal,
};
// The new tab/window must use the same userContextId