Commit d1e628ad authored by Samuel Huang's avatar Samuel Huang Committed by Commit Bot

Revert "[DFM] Defer ModuleUtil.recordModuleAvailability() call to onFinishNativeInitialization()."

This reverts commit c8af0e6f.

Reason for revert: The fix is effective for local build, but not Canary. Also, a better fix is available. Reverting this first simplifies merge into trunk.

Original change's description:
> [DFM] Defer ModuleUtil.recordModuleAvailability() call to onFinishNativeInitialization().
>
> Previously, ModuleUtil.recordModuleAvailability() was called from
> ChromeApplication.attachBaseContext(). A side-effect of MU.rMA() is that
> it initializes SplitCompat. However, for yet-to-be determined reason,
> this early initialization causes failure downstream in
> ChromeContentBrowserClient, so that if a DevUI page is loaded as the
> active page, restarting Chrome would cause it to fail to load!
>
> This CL alleviates the problem by deferring the MU.rMA() call to
> ChromeBrowserInitializer.onFinishNativeInitialization(), thereby
> avoiding initializing SplitCompat too early, while still recording
> module metrics at start-up.
>
> Bug: 1036753
> Change-Id: I21c02dc957f494fb76c959c772a6f77db8b933a9
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2003253
> Reviewed-by: Peter Wen <wnwen@chromium.org>
> Reviewed-by: Yaron Friedman <yfriedman@chromium.org>
> Commit-Queue: Peter Wen <wnwen@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#732158}

TBR=yfriedman@chromium.org,huangs@chromium.org,wnwen@chromium.org
NOTRY=true

Bug: 1036753
Change-Id: I2d566cb8b34f8f409b74a072a079706bf042f4a3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2011440Reviewed-by: default avatarSamuel Huang <huangs@chromium.org>
Commit-Queue: Samuel Huang <huangs@chromium.org>
Cr-Commit-Position: refs/heads/master@{#733493}
parent 07d03da4
...@@ -117,6 +117,10 @@ public class ChromeApplication extends Application { ...@@ -117,6 +117,10 @@ public class ChromeApplication extends Application {
ApplicationStatus.registerApplicationStateListener( ApplicationStatus.registerApplicationStateListener(
ChromeApplication::updateMemoryPressurePolling); ChromeApplication::updateMemoryPressurePolling);
// Record via UMA all modules that have been requested and are currently installed. This
// will tell us the install penetration of each module over time.
ModuleUtil.recordModuleAvailability();
// Set Chrome factory for mapping BackgroundTask classes to TaskIds. // Set Chrome factory for mapping BackgroundTask classes to TaskIds.
ChromeBackgroundTaskFactory.setAsDefault(); ChromeBackgroundTaskFactory.setAsDefault();
} }
......
...@@ -415,11 +415,6 @@ public class ChromeBrowserInitializer { ...@@ -415,11 +415,6 @@ public class ChromeBrowserInitializer {
FeatureUtilities.cacheNativeFlagsForServiceManagerOnlyMode(); FeatureUtilities.cacheNativeFlagsForServiceManagerOnlyMode();
ModuleUtil.recordStartupTime(); ModuleUtil.recordStartupTime();
// Record via UMA all modules that have been requested and are currently installed. This
// will tell us the install penetration of each module over time.
// Side effect: SplitCompat is initialized.
ModuleUtil.recordModuleAvailability();
} }
private ActivityStateListener createActivityStateListener() { private ActivityStateListener createActivityStateListener() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment