Bug 939060 - Check URL associated with grid item before displaying favicon (r=rnewman, a=bajaj)
authorLucas Rocha <lucasr@mozilla.com>
Wed, 20 Nov 2013 17:09:51 -0800
changeset 166571 6ce5d00f1aa8d16479020a44e75b61ab343cec8b
parent 166570 a4bb868db6fb3187833f9ffc6b84cf310b6f7f65
child 166572 8e85dacac5dec38a75f47f868028553ce6768617
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)
reviewersrnewman, bajaj
bugs939060
milestone27.0a2
Bug 939060 - Check URL associated with grid item before displaying favicon (r=rnewman, a=bajaj)
mobile/android/base/home/TopSitesPage.java
--- a/mobile/android/base/home/TopSitesPage.java
+++ b/mobile/android/base/home/TopSitesPage.java
@@ -632,17 +632,19 @@ public class TopSitesPage extends HomeFr
         }
 
         public void setLoadId(int id) {
             this.loadId = id;
         }
 
         @Override
         public void onFaviconLoaded(String url, String faviconURL, Bitmap favicon) {
-            this.view.displayFavicon(favicon, faviconURL, this.loadId);
+            if (TextUtils.equals(this.view.getUrl(), url)) {
+                this.view.displayFavicon(favicon, faviconURL, this.loadId);
+            }
         }
     }
 
     private class CursorLoaderCallbacks implements LoaderCallbacks<Cursor> {
         @Override
         public Loader<Cursor> onCreateLoader(int id, Bundle args) {
             trace("Creating TopSitesLoader: " + id);
             return new TopSitesLoader(getActivity());