commit | 58e5ea453d5a4bd868f3ca8cd7c5b407e335ede1 | [log] [tgz] |
---|---|---|
author | Torne (Richard Coles) <[email protected]> | Fri Nov 01 19:13:58 2019 |
committer | Commit Bot <[email protected]> | Fri Nov 01 19:13:58 2019 |
tree | 6a926669f2dde19b534c8a29e50ec22796a1724f | |
parent | a82f11723ee793f189370ee41de2fc8d23b0029b [diff] |
WebView: Fix deadlock in CookieManager. The new implementation of CookieManager::SetAcceptFileSchemeCookies introduced by the network servicification can deadlock when the embedding app is using the CookieManager API in a silly (but not forbidden) way. The deadlock occurs because the calling thread holds accept_file_scheme_cookies_lock_ while waiting synchronously for a task to complete on the CookieManagerClient thread, but it's possible that a task was already queued on that thread which is going to call GetCookieStore() and then attempt to acquire accept_file_scheme_cookies_lock_ to create the cookie store. Avoid this by moving the code which updates accept_file_scheme_cookies_ to run as part of the posted task instead. Also, add thread annotations to CookieManager to clarify which locks protect which state, as the existing comment was not correct. Fixed: 992829 Change-Id: I61aa3a505add2866fdf4317ffa7cf33e684ddc55 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1890953 Reviewed-by: Tobias Sargeant <[email protected]> Reviewed-by: Changwan Ryu <[email protected]> Reviewed-by: Nate Fischer <[email protected]> Commit-Queue: Richard Coles <[email protected]> Cr-Commit-Position: refs/heads/master@{#711806}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .