Reland: Make LayoutManager observer notification async
The process of supplying OverviewModeBehavior is now async to prevent re-entrancy in OneshotSupplier (as of https://crrev.com/c/2321067). Since observer notification in LayoutManager is synchronous, this creates a race condition where observers miss an update because an event (e.g. a touch event, as in the linked bug) queued before the call to set() can trigger synchronous observer notification before observers can add themselves. Reland note: StatusBarColorController failed on L due to a difference in how colors should be calculated. I'm not positive why TabbedAppMenuTest failed, but it seemed to be a race condition triggered (or uncovered) by the change in timing caused by making observer notification async. I think I've fixed it by blocking on the call to showAppMenu rather than polling the status via the instrumentation thread. Bug: 1129783 Change-Id: I88ac8efcc845826f0396cb624450ef1ba8d5b399 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2427428Reviewed-by:Xi Han <hanxi@chromium.org> Reviewed-by:
David Trainor <dtrainor@chromium.org> Commit-Queue: Patrick Noland <pnoland@chromium.org> Cr-Commit-Position: refs/heads/master@{#810429}
Showing
Please register or sign in to comment