Bug 935157 - Correctly cache favicons by favicon URL, not page URL, and don't log page URLs on failure. r=margaret, a=bajaj
authorRichard Newman <rnewman@mozilla.com>
Tue, 05 Nov 2013 17:57:04 -0800
changeset 166424 fed7434e96fba56fca75b323dd9b82b6ac5f79fc
parent 166423 5437dcd8200e6a7d1f55dc1bd6d7174d2e026da6
child 166425 c6d43940a3ed122f845f0e3f0d3026451b455aea
push id3066
push userakeybl@mozilla.com
push dateMon, 09 Dec 2013 19:58:46 +0000
treeherdermozilla-beta@a31a0dce83aa [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmargaret, bajaj
bugs935157
milestone27.0a2
Bug 935157 - Correctly cache favicons by favicon URL, not page URL, and don't log page URLs on failure. r=margaret, a=bajaj
mobile/android/base/favicons/cache/FaviconCache.java
mobile/android/base/home/TwoLinePageRow.java
--- a/mobile/android/base/favicons/cache/FaviconCache.java
+++ b/mobile/android/base/favicons/cache/FaviconCache.java
@@ -428,17 +428,18 @@ public class FaviconCache {
      * @param key The URL of the Favicon for which a dominant colour is desired.
      * @return The cached dominant colour, or null if none is cached.
      */
     public int getDominantColor(String key) {
         startRead();
 
         try {
             if (!mBackingMap.containsKey(key)) {
-                Log.w(LOGTAG, "Cannot compute dominant color of non-cached favicon " + key);
+                Log.w(LOGTAG, "Cannot compute dominant color of non-cached favicon. Cache fullness " +
+                              mCurrentSize.get() + '/' + mMaxSizeBytes);
                 finishRead();
                 return 0xFFFFFF;
             }
 
             FaviconsForURL element = mBackingMap.get(key);
 
             return element.ensureDominantColor();
         } finally {
--- a/mobile/android/base/home/TwoLinePageRow.java
+++ b/mobile/android/base/home/TwoLinePageRow.java
@@ -57,17 +57,17 @@ public class TwoLinePageRow extends Line
                 return;
             }
 
             if (favicon == null) {
                 v.showDefaultFavicon();
                 return;
             }
 
-            v.updateImage(favicon, url);
+            v.updateImage(favicon, faviconURL);
         }
     }
 
     // Listener for handling Favicon loads.
     private final OnFaviconLoadedListener mFaviconListener;
 
     // The URL for the page corresponding to this view.
     private String mPageUrl;