New issue
Advanced search Search tips

Issue 751143 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Closed: Aug 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug

Blocking:
issue 753012
issue 751191



Sign in to add a comment

mash: Defer ash::Shell init until local state prefs are ready

Project Member Reported by jamescook@chromium.org, Aug 1 2017

Issue description

During ash startup under mash the ash::Shell instance:
1. Builds a pref registry with all the local state prefs it cares about
2. Makes an async connection to Chrome's mojo pref service for local state prefs. I believe this reads the initial values of prefs.
3. An arbitrary amount of time later, ash::Shell::GetLocalStatePrefService becomes non-null and prefs can be used

However, local state prefs are often used for values needed during startup. The most immediate issue is wallpaper average color, see https://chromium-review.googlesource.com/572144, (reverted at https://chromium-review.googlesource.com/594715 due to this issue) and https://chromium-review.googlesource.com/c/595123 

This isn't a problem under classic ash, as ash uses a delegate back to chrome to access the local state pref service directly.

For mash, it would be better to have ash defer ash::Shell initialization until the local state pref service is ready. Then ash UI init code could rely on local state prefs being available, like it does in chrome.

 

Comment 1 by wzang@chromium.org, Aug 1 2017

Cc: r...@chromium.org jdufault@chromium.org

Comment 2 by wzang@chromium.org, Aug 1 2017

Blocking: 751191
Status: Started (was: Assigned)
Status: WontFix (was: Started)
I investigating delaying ash::Shell initialization on mash until the local state pref service connection is ready. We cannot do this now because it introduces startup deadlocks for mash. In particular, chrome startup blocks while waiting for root windows to be initialized, which is dependent on ash. If ash startup waits on chrome to provide the pref service then ash and chrome deadlock.

See ScreenMus and http://crbug.com/594852

I think we'll need to introduce a ShellObserver::OnLocalStatePrefServiceReady() method, or something similar. See https://docs.google.com/document/d/1pz-uv1LnJUIOnV0rA_Qp-4mCfnLLluzDii5j849XKjs/edit#

Blocking: 753012
Components: -Internals>MUS Internals>Services>WindowService

Sign in to add a comment