Bug 523369: [Regression] Secure favicon.ico request pop-ups certificate error dialog [r=vingtetun]
authorMark Finkle <mfinkle@mozilla.com>
Tue, 20 Oct 2009 15:16:00 -0400
changeset 65687 26bc29c7224a44fa9bc3a7ec273ac5fa7cb6227f
parent 65686 cd58901135376d2c084876bdc3a5237b782cacd0
child 65688 f8487fa6503f0391511ba908414cf98c7f8d65c8
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersvingtetun
bugs523369
Bug 523369: [Regression] Secure favicon.ico request pop-ups certificate error dialog [r=vingtetun]
mobile/chrome/content/browser-ui.js
mobile/chrome/content/browser.js
--- a/mobile/chrome/content/browser-ui.js
+++ b/mobile/chrome/content/browser-ui.js
@@ -385,20 +385,16 @@ var BrowserUI = {
     ExtensionsView.uninit();
     ConsoleView.uninit();
   },
 
   update : function(aState) {
     let icons = document.getElementById("urlbar-icons");
     let browser = Browser.selectedBrowser;
 
-    // Use documentURIObject in the favicon construction so that we
-    // do the right thing with about:-style error pages.  Bug 515188
-    let uri = browser.contentDocument.documentURIObject;
-
     switch (aState) {
       case TOOLBARSTATE_LOADED:
         if (icons.getAttribute("mode") != "edit")
           icons.setAttribute("mode", "view");
 
         this._updateIcon(browser.mIconURL);
         break;
 
--- a/mobile/chrome/content/browser.js
+++ b/mobile/chrome/content/browser.js
@@ -2594,17 +2594,19 @@ Tab.prototype = {
       }
       catch (e) {
         faviconURI = null;
       }
     }
 
     if (!faviconURI || faviconURI.schemeIs("javascript") || gFaviconService.isFailedFavicon(faviconURI)) {
       try {
-        faviconURI = gIOService.newURI(this._browser.currentURI.prePath + "/favicon.ico", null, null);
+        // Use documentURIObject in the favicon construction so that we
+        // do the right thing with about:-style error pages.  Bug 515188
+        faviconURI = gIOService.newURI(this._browser.contentDocument.documentURIObject.prePath + "/favicon.ico", null, null);
         gFaviconService.setAndLoadFaviconForPage(this._browser.currentURI, faviconURI, true);
       }
       catch (e) {
         faviconURI = null;
       }
       if (faviconURI && gFaviconService.isFailedFavicon(faviconURI))
         faviconURI = null;
     }