Bug 1135934 - Make "View Background Image" and "View Description" use gContextMenuContentData to avoid unsafe CPOW warnings. r=mconley

This commit is contained in:
Ian Moody 2015-03-08 10:19:00 -04:00
parent 0a62013354
commit 76928102b6

View File

@ -1005,12 +1005,11 @@ nsContextMenu.prototype = {
},
viewImageDesc: function(e) {
var doc = this.target.ownerDocument;
urlSecurityCheck(this.imageDescURL,
this.browser.contentPrincipal,
Ci.nsIScriptSecurityManager.DISALLOW_SCRIPT);
openUILink(this.imageDescURL, e, { disallowInheritPrincipal: true,
referrerURI: doc.documentURIObject });
referrerURI: gContextMenuContentData.documentURIObject });
},
viewFrameInfo: function() {
@ -1080,9 +1079,8 @@ nsContextMenu.prototype = {
urlSecurityCheck(this.bgImageURL,
this.browser.contentPrincipal,
Ci.nsIScriptSecurityManager.DISALLOW_SCRIPT);
var doc = this.target.ownerDocument;
openUILink(this.bgImageURL, e, { disallowInheritPrincipal: true,
referrerURI: doc.documentURIObject });
referrerURI: gContextMenuContentData.documentURIObject });
},
disableSetDesktopBackground: function() {