Bug 1264134 - Don't assert SavedReaderViewHelper running off main thread r?mcomella draft
authorAndrzej Hunt <ahunt@mozilla.com>
Tue, 12 Apr 2016 18:55:25 -0700
changeset 350237 f66b8a5ddcd9f0842c1012f17613a1bdf9a2a2ce
parent 350159 0fd480526ad32b3be13d51976a5961fe715342b1
child 350420 18e57d688406f6763f6cba7f437851517efc7db7
child 350427 60f9e8445e135ea91fcbc64c43c6a0d3feb38567
push id15279
push userahunt@mozilla.com
push dateWed, 13 Apr 2016 01:55:49 +0000
reviewersmcomella
bugs1264134
milestone48.0a1
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,19 @@ 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();
+        // 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) {