Commit e4c0a3fc authored by Ali Juma's avatar Ali Juma Committed by Commit Bot

[iOS] Ensure persistent cookie store's backend is closed on shutdown

This CL uses TaskShutdownBehavior::BLOCK_SHUTDOWN for the
background task runner associated with an
SQLLitePersistentCookieStore, matching the behavior in
content/. This ensures that when an SQLLitePersistentCookieStore
is destroyed, the call to
SQLitePersistentStoreBackendBase::DoCloseInBackground posted to
the background thread gets executed before the
SQLitePersistentStoreBackendBase is destroyed, fixing an
assertion failure.

Bug: 1121986
Change-Id: I77c7fad335b07508fb316fc6b1a88b822692893d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2398510Reviewed-by: default avatarEugene But <eugenebut@chromium.org>
Commit-Queue: Ali Juma <ajuma@chromium.org>
Cr-Commit-Position: refs/heads/master@{#805287}
parent 1b62e9e8
......@@ -48,7 +48,8 @@ scoped_refptr<net::SQLitePersistentCookieStore> CreatePersistentCookieStore(
new net::SQLitePersistentCookieStore(
path, base::CreateSingleThreadTaskRunner({web::WebThread::IO}),
base::ThreadPool::CreateSequencedTaskRunner(
{base::MayBlock(), base::TaskPriority::BEST_EFFORT}),
{base::MayBlock(), base::TaskPriority::BEST_EFFORT,
base::TaskShutdownBehavior::BLOCK_SHUTDOWN}),
restore_old_session_cookies, crypto_delegate));
}
......
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