summaryrefslogtreecommitdiffstats
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
commite0a24e6d4f43a5f240f4c389e57a23a7a32f84ab (patch)
tree8c57de672260fec82ca55da3c2e2ef24cb184030
parent73b55c16d642156c58142d1ce4cfb79229cfadb0 (diff)
downloadUXP-e0a24e6d4f43a5f240f4c389e57a23a7a32f84ab.tar
UXP-e0a24e6d4f43a5f240f4c389e57a23a7a32f84ab.tar.gz
UXP-e0a24e6d4f43a5f240f4c389e57a23a7a32f84ab.tar.lz
UXP-e0a24e6d4f43a5f240f4c389e57a23a7a32f84ab.tar.xz
UXP-e0a24e6d4f43a5f240f4c389e57a23a7a32f84ab.zip
Bug 1343279 - Use SystemPrincipal when loading canvasToBlobURL
-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 ddf695202..cd93a803c 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 {