Bug 1343279 - Use SystemPrincipal when loading canvasToBlobURL

This commit is contained in:
janekptacijarabaci 2018-04-30 23:52:21 +02:00 committed by Roy Tam
commit c32aa9df5d

View file

@ -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 {