| Index: chrome/android/java/src/org/chromium/chrome/browser/init/NativeInitializationController.java
|
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/init/NativeInitializationController.java b/chrome/android/java/src/org/chromium/chrome/browser/init/NativeInitializationController.java
|
| index 5cc01c8061ab0a82adada3a01deb04338d87d731..ec86c0e34ae6b8165e66f43d29018712367a54b5 100644
|
| --- a/chrome/android/java/src/org/chromium/chrome/browser/init/NativeInitializationController.java
|
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/init/NativeInitializationController.java
|
| @@ -36,7 +36,7 @@ class NativeInitializationController {
|
| private List<Intent> mPendingNewIntents;
|
| private List<ActivityResult> mPendingActivityResults;
|
|
|
| - private boolean mBackgroundTasksComplete;
|
| + private Boolean mBackgroundTasksComplete;
|
| private boolean mHasDoneFirstDraw;
|
| private boolean mHasSignaledLibraryLoaded;
|
| private boolean mInitializationComplete;
|
| @@ -76,7 +76,7 @@ class NativeInitializationController {
|
| */
|
| public void startBackgroundTasks(final boolean allocateChildConnection) {
|
| ThreadUtils.assertOnUiThread();
|
| -
|
| + assert mBackgroundTasksComplete == null;
|
| boolean fetchVariationsSeed = FirstRunFlowSequencer.checkIfFirstRunIsNecessary(
|
| ContextUtils.getApplicationContext(),
|
| mActivityDelegate.getInitialIntent(), false)
|
| @@ -108,7 +108,7 @@ class NativeInitializationController {
|
| ThreadUtils.assertOnUiThread();
|
|
|
| // Called on UI thread when any of the booleans below have changed.
|
| - if (mHasDoneFirstDraw && mBackgroundTasksComplete) {
|
| + if (mHasDoneFirstDraw && (mBackgroundTasksComplete != null && mBackgroundTasksComplete)) {
|
| // This block should only be hit once.
|
| assert !mHasSignaledLibraryLoaded;
|
| mHasSignaledLibraryLoaded = true;
|
|
|