New issue
Advanced search Search tips

Issue 814323 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Feb 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: iOS
Pri: 3
Type: Bug



Sign in to add a comment

DCHECK failure in BrowserStateDataRemover::RemoveBrowserStateData

Project Member Reported by sdefresne@chromium.org, Feb 21 2018

Issue description

Sometimes when running EG tests, DCHECK in BrowserStateDataRemover::RemoveBrowserStateData because UIApplication -keyWindow returns nil.

This happens if AuthenticationServiceFactory::CreateAndInitializeForBrowserState invokes its AuthenticationServiceDelegate's ClearBrowsingData which happens synchronously as part of the initialisation under certain circumstances.

In that case the DCHECK fails because makeKeyAndVisible is invoked from MainController -createInitialUI: which happens after the initialisation of AuthenticationServiceFactory.

This was introduced by https://chromium-review.googlesource.com/863666 that moved the initialisation from a background queue to the main thread. As initialisation was asynchronous before, it happened after the registration of the keyWindow. Fix would be to post the call to BrowserDataRemover on a background task.
 
Components: Internals
Status: Fixed (was: Assigned)
Fixed by https://chromium-review.googlesource.com/c/chromium/src/+/934501.

Sign in to add a comment