bug 721308 - ConcurrentModificationException when closing a tab and reopening the tabstray quickly r=mfinkle
authorBrad Lassey <blassey@mozilla.com>
Thu, 26 Jan 2012 17:57:15 -0500
changeset 86760 841549cbe2ff3c77b411f12e3674441e293cdd31
parent 86759 f64e79dc46aba10f24d024ffa7f4e8072d73b138
child 86761 7b6195e6cc41aa82d21058b234b71b8edd9b0b6b
push id805
push userakeybl@mozilla.com
push dateWed, 01 Feb 2012 18:17:35 +0000
treeherdermozilla-aurora@6fb3bf232436 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmfinkle
bugs721308
milestone12.0a1
bug 721308 - ConcurrentModificationException when closing a tab and reopening the tabstray quickly r=mfinkle
mobile/android/base/Tabs.java
--- a/mobile/android/base/Tabs.java
+++ b/mobile/android/base/Tabs.java
@@ -283,17 +283,19 @@ public class Tabs implements GeckoEventL
                 GeckoApp.mAppContext.processThumbnail(tab, null, compressed);
             }
         } catch (Exception e) { 
             Log.i(LOGTAG, "handleMessage throws " + e + " for message: " + event);
         }
     }
 
     public void refreshThumbnails() {
-        GeckoAppShell.getHandler().post(new Runnable() {
-            public void run() {
-                Iterator<Tab> iterator = tabs.values().iterator();
-                while (iterator.hasNext())
-                    GeckoApp.mAppContext.getAndProcessThumbnailForTab(iterator.next());
-            }
-        });
+        Iterator<Tab> iterator = tabs.values().iterator();
+        while (iterator.hasNext()) {
+            final Tab tab = iterator.next();
+            GeckoAppShell.getHandler().post(new Runnable() {
+                public void run() {
+                    GeckoApp.mAppContext.getAndProcessThumbnailForTab(tab);
+                }
+            });
+        }
     }
 }