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
--- 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);
}
}
/**