summaryrefslogtreecommitdiffstats
path: root/application
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2018-11-14 02:54:29 -0500
committerMatt A. Tobin <email@mattatobin.com>2018-11-14 02:54:29 -0500
commit81c27113a3e5389badf543557eaf25850ba3418b (patch)
tree7c0034735d2d35393d9c19562a6512098ac7e2a4 /application
parente3f4fe530a1ff25dc641877ec47d40fd774fe036 (diff)
downloadUXP-81c27113a3e5389badf543557eaf25850ba3418b.tar
UXP-81c27113a3e5389badf543557eaf25850ba3418b.tar.gz
UXP-81c27113a3e5389badf543557eaf25850ba3418b.tar.lz
UXP-81c27113a3e5389badf543557eaf25850ba3418b.tar.xz
UXP-81c27113a3e5389badf543557eaf25850ba3418b.zip
[PALEMOON] Use generic application icon for external applications in about:feeds
Diffstat (limited to 'application')
-rw-r--r--application/palemoon/components/feeds/FeedWriter.js20
1 files changed, 4 insertions, 16 deletions
diff --git a/application/palemoon/components/feeds/FeedWriter.js b/application/palemoon/components/feeds/FeedWriter.js
index 2ae31dffa..d704835bb 100644
--- a/application/palemoon/components/feeds/FeedWriter.js
+++ b/application/palemoon/components/feeds/FeedWriter.js
@@ -692,21 +692,6 @@ FeedWriter.prototype = {
},
/**
- * Get moz-icon url for a file
- * @param file
- * A nsIFile object for which the moz-icon:// is returned
- * @returns moz-icon url of the given file as a string
- */
- _getFileIconURL: function FW__getFileIconURL(file) {
- var ios = Cc["@mozilla.org/network/io-service;1"].
- getService(Ci.nsIIOService);
- var fph = ios.getProtocolHandler("file")
- .QueryInterface(Ci.nsIFileProtocolHandler);
- var urlSpec = fph.getURLSpecFromFile(file);
- return "moz-icon://" + urlSpec + "?size=16";
- },
-
- /**
* Helper method to set the selected application and system default
* reader menuitems details from a file object
* @param aMenuItem
@@ -717,7 +702,10 @@ FeedWriter.prototype = {
_initMenuItemWithFile: function(aMenuItem, aFile) {
this._contentSandbox.menuitem = aMenuItem;
this._contentSandbox.label = this._getFileDisplayName(aFile);
- this._contentSandbox.image = this._getFileIconURL(aFile);
+ // For security reasons, access to moz-icon:file://... URIs is
+ // no longer allowed (indirect file system access from content).
+ // We use a dummy application instead to get a generic icon.
+ this._contentSandbox.image = "moz-icon://dummy.exe?size=16";
var codeStr = "menuitem.setAttribute('label', label); " +
"menuitem.setAttribute('image', image);"
Cu.evalInSandbox(codeStr, this._contentSandbox);