Fix crash when running NetworkService out of process on Android
SimpleIndex uses an ApplicationStatusListener to know when to write the cache to disk. This is used in the network service, and when network service is run out of process, this causes a crash since ApplicationStatusListener should only be used from the main process. To fix this, I changed ApplicationStatusListener to have a SetCallback interface, that can then have an implementation in the network service. If the cache is being created in the network service, we can pass the network service implementation of ApplicationStatusListener. The NetworkServiceClient will then notify network service of status changes from the main process. Bug: 881572 Cq-Include-Trybots: luci.chromium.try:linux_mojo Change-Id: I1824e8e8c13f4294fd3a500545714c13a90db08b Reviewed-on: https://chromium-review.googlesource.com/1225606Reviewed-by:Maks Orlovich <morlovich@chromium.org> Reviewed-by:
Tom Sepez <tsepez@chromium.org> Reviewed-by:
Tommy Nyquist <nyquist@chromium.org> Reviewed-by:
John Abd-El-Malek <jam@chromium.org> Commit-Queue: Clark DuVall <cduvall@chromium.org> Cr-Commit-Position: refs/heads/master@{#593032}
Showing
Please register or sign in to comment