mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-20 14:17:30 +09:00
Bug 1343279 - Use SystemPrincipal when loading canvasToBlobURL
This commit is contained in:
parent
fab9589713
commit
c32aa9df5d
1 changed files with 3 additions and 1 deletions
|
|
@ -1147,10 +1147,12 @@ nsContextMenu.prototype = {
|
||||||
// Change current window to the URL of the image, video, or audio.
|
// Change current window to the URL of the image, video, or audio.
|
||||||
viewMedia: function(e) {
|
viewMedia: function(e) {
|
||||||
let referrerURI = gContextMenuContentData.documentURIObject;
|
let referrerURI = gContextMenuContentData.documentURIObject;
|
||||||
|
let systemPrincipal = Services.scriptSecurityManager.getSystemPrincipal();
|
||||||
if (this.onCanvas) {
|
if (this.onCanvas) {
|
||||||
this._canvasToBlobURL(this.target).then(function(blobURL) {
|
this._canvasToBlobURL(this.target).then(function(blobURL) {
|
||||||
openUILink(blobURL, e, { disallowInheritPrincipal: true,
|
openUILink(blobURL, e, { disallowInheritPrincipal: true,
|
||||||
referrerURI: referrerURI });
|
referrerURI: referrerURI,
|
||||||
|
originPrincipal: systemPrincipal});
|
||||||
}, Cu.reportError);
|
}, Cu.reportError);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue