Use document's principal for favicons in browser

This commit is contained in:
JustOff 2018-04-14 00:32:14 +03:00 • committed by Roy Tam
commit e05e624eb8
4 changed files with 27 additions and 12 deletions

View file

@ -1395,6 +1395,8 @@ FeedWriter.prototype = {
.QueryInterface(Ci.nsIDocShell)
.QueryInterface(Ci.nsILoadContext)
.usePrivateBrowsing;
var nullPrincipal = Cc["@mozilla.org/nullprincipal;1"]
.createInstance(Ci.nsIPrincipal);
this._faviconService.setAndFetchFaviconForPage(readerURI, faviconURI, false,
usePrivateBrowsing ? this._faviconService.FAVICON_LOAD_PRIVATE
: this._faviconService.FAVICON_LOAD_NON_PRIVATE,
@ -1409,7 +1411,7 @@ FeedWriter.prototype = {
self._contentSandbox.menuItem = null;
self._contentSandbox.dataURL = null;
}
});
}, nullPrincipal);
},
classID: FEEDWRITER_CID,