Bug 571812 - Remove setIcon [r=vingtetun]
authorMark Finkle <mfinkle@mozilla.com>
Mon, 14 Jun 2010 09:08:07 -0400
changeset 66282 177f2450087e8d2c1a5968ea8f64e5cd3f23a9c8
parent 66281 d098b16ce883a2c4e83b943e65c7f046aeacc6d9
child 66283 f67966867bccdab6e02fda73cfcb27a6a3ab03d1
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
bugs571812
Bug 571812 - Remove setIcon [r=vingtetun]
mobile/chrome/content/browser.js
--- a/mobile/chrome/content/browser.js
+++ b/mobile/chrome/content/browser.js
@@ -3139,18 +3139,16 @@ Tab.prototype = {
         bv.ignorePageScroll(true);
         Browser.scrollBrowserToContent();
       }
     }
   },
 
   endLoading: function endLoading() {
     if (!this._loading) throw "Not Loading!";
-
-    this.setIcon(this._browser.mIconURL);
     this._loading = false;
 
     if (this == Browser.selectedTab) {
       let bv = Browser._browserView;
       bv.ignorePageScroll(false);
       bv.setAggressive(true);
     }
 
@@ -3307,44 +3305,16 @@ Tab.prototype = {
       return;
 
     let bv = Browser._browserView;
     let browserView = (Browser.selectedBrowser == this._browser && bv.isDefaultZoom()) ? Browser._browserView 
                                                                                        : null;
     this._chromeTab.updateThumbnail(this._browser, browserView);
   },
 
-  setIcon: function setIcon(aURI) {
-    let faviconURI = null;
-    if (aURI) {
-      try {
-        faviconURI = gIOService.newURI(aURI, null, null);
-      }
-      catch (e) {
-        faviconURI = null;
-      }
-    }
-
-    if (!faviconURI || faviconURI.schemeIs("javascript") || gFaviconService.isFailedFavicon(faviconURI)) {
-      try {
-        // 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;
-    }
-
-    this._browser.mIconURL = faviconURI ? faviconURI.spec : "";
-  },
-
   toString: function() {
     return "[Tab " + (this._browser ? this._browser.contentDocument.location.toString() : "(no browser)") + "]";
   }
 };
 
 var ImagePreloader = {
   cache: function ip_cache() {
     // Preload images used in border-image CSS