summaryrefslogtreecommitdiff
path: root/browser/base
diff options
context:
space:
mode:
authorjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-04-30 23:52:21 +0200
committerjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-04-30 23:52:21 +0200
commitd09f68fdef56b0d59d93bf43812458f7f69d395f (patch)
tree8c57de672260fec82ca55da3c2e2ef24cb184030 /browser/base
parent6f75c4c22275621766d960de1407585a6b49c58b (diff)
downloaduxp-d09f68fdef56b0d59d93bf43812458f7f69d395f.tar.gz
Bug 1343279 - Use SystemPrincipal when loading canvasToBlobURL
Diffstat (limited to 'browser/base')
-rw-r--r--browser/base/content/nsContextMenu.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/browser/base/content/nsContextMenu.js b/browser/base/content/nsContextMenu.js
index ddf6952026..cd93a803c6 100644
--- a/browser/base/content/nsContextMenu.js
+++ b/browser/base/content/nsContextMenu.js
@@ -1147,10 +1147,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,
+ originPrincipal: systemPrincipal});
}, Cu.reportError);
}
else {