summaryrefslogtreecommitdiffstats
path: root/browser/base/content/nsContextMenu.js
diff options
context:
space:
mode:
authorMoonchild <mcwerewolf@gmail.com>2018-05-01 09:53:46 +0200
committerGitHub <noreply@github.com>2018-05-01 09:53:46 +0200
commitae45e61da06ba989fcbb856183d9578d4d4f51ed (patch)
tree5c7dea17ce684c1cce57011ef487370c22d0e677 /browser/base/content/nsContextMenu.js
parentfefce8f7ccbc476cfc46e61b01eff069346d3c73 (diff)
parentcc4036a9cd56d504667c07fe215e61b22ab0e1f4 (diff)
downloadUXP-ae45e61da06ba989fcbb856183d9578d4d4f51ed.tar
UXP-ae45e61da06ba989fcbb856183d9578d4d4f51ed.tar.gz
UXP-ae45e61da06ba989fcbb856183d9578d4d4f51ed.tar.lz
UXP-ae45e61da06ba989fcbb856183d9578d4d4f51ed.tar.xz
UXP-ae45e61da06ba989fcbb856183d9578d4d4f51ed.zip
Merge pull request #311 from janekptacijarabaci/security_blocking_data_2
Use asyncOpen2() for docshell loads
Diffstat (limited to 'browser/base/content/nsContextMenu.js')
-rw-r--r--browser/base/content/nsContextMenu.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/browser/base/content/nsContextMenu.js b/browser/base/content/nsContextMenu.js
index ddf695202..955184f64 100644
--- a/browser/base/content/nsContextMenu.js
+++ b/browser/base/content/nsContextMenu.js
@@ -968,6 +968,7 @@ nsContextMenu.prototype = {
_openLinkInParameters : function (extra) {
let params = { charset: gContextMenuContentData.charSet,
originPrincipal: this.principal,
+ triggeringPrincipal: this.principal,
referrerURI: gContextMenuContentData.documentURIObject,
referrerPolicy: gContextMenuContentData.referrerPolicy,
noReferrer: this.linkHasNoReferrer };
@@ -1147,10 +1148,12 @@ nsContextMenu.prototype = {
// Change current window to the URL of the image, video, or audio.
viewMedia: function(e) {
let referrerURI = gContextMenuContentData.documentURIObject;
+ let systemPrincipal = Services.scriptSecurityManager.getSystemPrincipal();
if (this.onCanvas) {
this._canvasToBlobURL(this.target).then(function(blobURL) {
openUILink(blobURL, e, { disallowInheritPrincipal: true,
- referrerURI: referrerURI });
+ referrerURI: referrerURI,
+ triggeringPrincipal: systemPrincipal});
}, Cu.reportError);
}
else {