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 85535 841549cbe2ff3c77b411f12e3674441e293cdd31
parent 85534 f64e79dc46aba10f24d024ffa7f4e8072d73b138
child 85536 7b6195e6cc41aa82d21058b234b71b8edd9b0b6b
push id21930
push usermbrubeck@mozilla.com
push dateFri, 27 Jan 2012 16:32:09 +0000
treeherdermozilla-central@7ab255f53568 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmfinkle
bugs721308
milestone12.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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);
+                }
+            });
+        }
     }
 }