Commit 757558d4 authored by Tobias Thierer's avatar Tobias Thierer
Browse files

Apply: Recover more gracefully when an editor is detached.

Backport upstream commit aae1a45bcb6dd2ffd3b0b87525bbef4e4517ddba

An app reported crashes whose stacktrace appears to match upstream
bug https://github.com/square/okhttp/issues/2420

Therefore this CL is backporting the corresponding fix.

Bug: 31823815
Test: mvn clean verify
Test: cts-tradefed run cts -m CtsLibcoreOkHttpTestCases
Test: cts-tradefed run cts -m CtsLibcoreTestCases -a arm64-v8a

Original commit message follows:

We had a bug where we could have two editors for the same entry. This
would occur when the cache was cleared, or if the entry was otherwise
evicted while the edit was in progress.

Previously the two editors would corrupt each other, and potentially
the cache's size. With this change the detached editor is limited and
harmless.

Change-Id: I56e3a27187f2df025c99916daed24acc63d589d3
parent 35adfe38
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment