Bug 1264134 - Don't assert SavedReaderViewHelper running off main thread r=mcomella
authorAndrzej Hunt <ahunt@mozilla.com>
Tue, 12 Apr 2016 18:55:25 -0700
changeset 330955 925b730233c2688aeb6ccdf474f3a54f01abfa65
parent 330954 927d52d615857dbc5f8e085e288a10b3fafeab60
child 330956 67a4c171c7e8871b06f5e81e8a59b7ed1219ead2
push id6048
push userkmoir@mozilla.com
push dateMon, 06 Jun 2016 19:02:08 +0000
treeherdermozilla-beta@46d72a56c57d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmcomella
bugs1264134
milestone48.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 1264134 - Don't assert SavedReaderViewHelper running off main thread r=mcomella It turns out that with sync enabled, we do the first load of the database on the UI thread. The SavedReaderViewHelper (which is initialised during DB load) assumes we're run off the main thread, we need to disable that assertion until we can ensure that DB loading is done off the main thread. MozReview-Commit-ID: AYQewTVjEbA
mobile/android/base/java/org/mozilla/gecko/reader/SavedReaderViewHelper.java
--- a/mobile/android/base/java/org/mozilla/gecko/reader/SavedReaderViewHelper.java
+++ b/mobile/android/base/java/org/mozilla/gecko/reader/SavedReaderViewHelper.java
@@ -84,17 +84,20 @@ public class SavedReaderViewHelper {
     }
 
     /**
      * Load the reader view cache list from our JSON file.
      *
      * Must not be run on the UI thread due to file access.
      */
     public synchronized void loadItems() {
-        ThreadUtils.assertNotOnUiThread();
+        // TODO bug 1264489
+        // This is a band aid fix for Bug 1264134. We need to figure out the root cause and reenable this
+        // assertion.
+        // ThreadUtils.assertNotOnUiThread();
 
         if (mItems != null) {
             return;
         }
 
         try {
             mItems = GeckoProfile.get(mContext).readJSONObjectFromFile(FILE_PATH);
         } catch (IOException e) {