commit | 8c82db62a5c255df1b0b513a8ceba430ea4b3b57 | [log] [tgz] |
---|---|---|
author | Sylvain Defresne <sdefresne@chromium.org> | Mon Jun 02 22:41:59 2025 |
committer | Chromium LUCI CQ <chromium-scoped@luci-project-accounts.iam.gserviceaccount.com> | Mon Jun 02 22:41:59 2025 |
tree | 8044e7db83beebb1c0ebe2230bc29ac62c7f19e7 | |
parent | 47c3d9e8b76407aaf0772cfb65dfd71e5c757b53 [diff] |
[ios] Fix lifetime of CRWWKHTTPCookieStore The Chrome SystemCookieStore is supposed to live on the IO thread, but the iOS WKHTTPCookieStore can only be used from the UI thread. The class web::WKHTTPSystemCookieStore::Helper manage the hopping between thread when invoking methods and invoking the callbacks, but the implementation could deallocate the CRWWKHTTPCookieStore on the IO thread if the PostTask(...) failed or if the scheduler interrupted the IO thread. To fix this race condition, introduce a new class that owns the lifetime of the CRWWKHTTPCookieStore, and change the constructor for SystemCookieStore to return both objects. web::WKHTTPSystemCookieStore::Helper now only has a weak reference to CRWWKHTTPCookieStore and should not extend its lifetime. The instance of SystemCookieStoreHandle also takes care of listening to the WKWebViewConfigurationProvider changes, thus removing the need for another helper class to bridge a SubscriptionList into an associated Objective-C object. Fixed: 419537880 Change-Id: Ifed149f99f856280ca9613f823cdf72197e5aebd Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6611380 Reviewed-by: Mike Dougherty <michaeldo@chromium.org> Commit-Queue: Mike Dougherty <michaeldo@chromium.org> Auto-Submit: Sylvain Defresne <sdefresne@chromium.org> Cr-Commit-Position: refs/heads/main@{#1468408}
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.
To check out the source code locally, don't use git clone
! Instead, follow the instructions on how to get the code.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure.
For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.
If you found a bug, please file it at https://crbug.com/new.