SimpleCache: fix lifetime of AppStatusListener on Android. Previously, NetworkContext would pass SimpleBackendImpl creation a pointer to a status listener it owns. While NetworkContext normally owns both the cache and the app status listener, the cache backend creation is an asynchronous process, so if the network context was destroyed before the cache creation was complete, and ownership of fresh cache backend handed over to NetworkContext, the backend could end up using a dangling pointer to AppStatusListener. This changes to pass in a getter RepeatingCallback instead, which checks for NetworkContext destruction before returning the pointer. Re-enable some tests that were flaking because of this. Bug: 1492976, 1311000, 1492127, 1492124, 1492118, 1493317 Change-Id: Ic2062c18d9e8a13470ee9d817ba81b49ce60c697 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4947433 Reviewed-by: Kenichi Ishibashi <bashi@chromium.org> Commit-Queue: Maks Orlovich <morlovich@chromium.org> Reviewed-by: Christian Dullweber <dullweber@chromium.org> Reviewed-by: Peter Beverloo <peter@chromium.org> Cr-Commit-Position: refs/heads/main@{#1211454}
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.