Bug 732901 - Call Tabs.notifyListeners() on the main thread. r=mfinkle a=lsblakk
authorMargaret Leibovic <margaret.leibovic@gmail.com>
Thu, 17 May 2012 14:35:33 -0700
changeset 95807 c064693c724c18e2f0fe206f08efb13493cb3751
parent 95806 2a3a10b7fc2535c59a045be39506741017a48079
child 95808 f4121274b38555528c17e88edd9cddaf4327378e
push id886
push userlsblakk@mozilla.com
push dateMon, 04 Jun 2012 19:57:52 +0000
treeherdermozilla-beta@bbd8d5efd6d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmfinkle, lsblakk
bugs732901
milestone14.0a2
Bug 732901 - Call Tabs.notifyListeners() on the main thread. r=mfinkle a=lsblakk
mobile/android/base/GeckoApp.java
--- a/mobile/android/base/GeckoApp.java
+++ b/mobile/android/base/GeckoApp.java
@@ -1257,17 +1257,21 @@ abstract public class GeckoApp
         });
     }
 
     void handleContentLoaded(int tabId) {
         final Tab tab = Tabs.getInstance().getTab(tabId);
         if (tab == null)
             return;
 
-        Tabs.getInstance().notifyListeners(tab, Tabs.TabEvents.LOADED);
+        mMainHandler.post(new Runnable() {
+            public void run() {
+                Tabs.getInstance().notifyListeners(tab, Tabs.TabEvents.LOADED);
+            }
+        });
     }
 
     void handleTitleChanged(int tabId, String title) {
         final Tab tab = Tabs.getInstance().getTab(tabId);
         if (tab == null)
             return;
 
         tab.updateTitle(title);