Bug 905223 - DON'T LAND - Debug log draft
authorJan Henning <jh+bugzilla@buttercookie.de>
Sat, 23 Apr 2016 22:00:42 +0200
changeset 367563 a303cca280cecf1990e1e64804fd3c7cb13cff6a
parent 367562 bb7be4c29fe1b839c2a97df3053bb397bdd6e5b6
child 521040 9a072ce29b6ff05fac5ef6c362a337fce58bcdad
push id18272
push usermozilla@buttercookie.de
push dateMon, 16 May 2016 21:15:30 +0000
bugs905223
milestone49.0a1
Bug 905223 - DON'T LAND - Debug log Check the state of the CountDownLatches to see whether they've been already released when calling await(). MozReview-Commit-ID: 7bta19vFDlQ
mobile/android/base/java/org/mozilla/gecko/GeckoApp.java
mobile/android/base/java/org/mozilla/gecko/GeckoProfile.java
--- a/mobile/android/base/java/org/mozilla/gecko/GeckoApp.java
+++ b/mobile/android/base/java/org/mozilla/gecko/GeckoApp.java
@@ -1529,16 +1529,17 @@ public abstract class GeckoApp
 
         initializeChrome();
 
         // If we are doing a restore, send the parsed session data to Gecko.
         try {
             // We need to wait here
             // a) for the session restore string itself and
             // b) because mShouldRestore can revert back to false if a parsing error occurs.
+            Log.d(LOGTAG, "Session data processing outstanding: " + mSessionRestoreParsingFinished.getCount());
             mSessionRestoreParsingFinished.await();
         } catch (InterruptedException e) {
             Log.e(LOGTAG, "Wait for session restore message interrupted: ", e);
         }
         if (!mIsRestoringActivity) {
             GeckoAppShell.notifyObservers("Session:Restore", mRestoreMessage);
         }
 
--- a/mobile/android/base/java/org/mozilla/gecko/GeckoProfile.java
+++ b/mobile/android/base/java/org/mozilla/gecko/GeckoProfile.java
@@ -786,16 +786,17 @@ public final class GeckoProfile {
                     System.currentTimeMillis() - sessionFileBackup.lastModified() > MAX_BACKUP_FILE_AGE) {
                 sessionFileBackup.delete();
             }
         }
         mOldSessionDataProcessed.countDown();
     }
 
     public void waitForOldSessionDataProcessing() {
+        Log.d(LOGTAG, "Session data processing outstanding: " + mOldSessionDataProcessed.getCount());
         try {
             mOldSessionDataProcessed.await();
         } catch (InterruptedException e) {
             Log.e(LOGTAG, "Wait for session data update interrupted: ", e);
         }
     }
 
     /**