Bug 471415: Opening chrome:// URLs in browser is broken

This commit is contained in:
Mark Finkle 2008-12-29 17:54:42 -05:00
parent ed976fca10
commit 88986cdb8c

View File

@ -123,10 +123,15 @@ var BrowserUI = {
_setIcon : function(aURI) {
var ios = Cc["@mozilla.org/network/io-service;1"].getService(Ci.nsIIOService);
var faviconURI = ios.newURI(aURI, null, null);
try {
var faviconURI = ios.newURI(aURI, null, null);
}
catch (e) {
faviconURI = null;
}
var fis = Cc["@mozilla.org/browser/favicon-service;1"].getService(Ci.nsIFaviconService);
if (faviconURI.schemeIs("javascript") || fis.isFailedFavicon(faviconURI))
if (!faviconURI || faviconURI.schemeIs("javascript") || fis.isFailedFavicon(faviconURI))
faviconURI = ios.newURI(kDefaultFavIconURL, null, null);
var browser = getBrowser();