Description[App banners] Start addressing race conditions
DEPENDS ON 914403006
* If a user visits a page that triggers a banner icon download
and immediately navigates away, the native BitmapFetcher will
be deleted before its callback is handled, resulting in a crash.
Address this by storing a vector of BitmapFetchers that are
trimmed as fetches complete.
* Add basic unit test for ensuring that the race condition doesn't
cause a crash anymore.
- There is still some timing wackiness that can go on here, like
having the entire AppBannerManager go away before the fetch
completes, but that requires further digging.
BUG=453170, 457414, 457413
TEST=AppBannerManagerTest
Committed: https://crrev.com/b4704eaa944bfd59f3397ef5ca9f892667a3bf87
Cr-Commit-Position: refs/heads/master@{#316875}
Patch Set 1 #Patch Set 2 : lint #Patch Set 3 : Strange anonymous namespace issue #Patch Set 4 : Anonymous, redux #Patch Set 5 : Moar tests. #Patch Set 6 : Cleaning #Patch Set 7 : Rebasing #Patch Set 8 : Rebasing #Patch Set 9 : Rebasing, split off the important unit tests #
Total comments: 8
Patch Set 10 : Revamping #
Total comments: 4
Patch Set 11 : Nits #
Messages
Total messages: 19 (6 generated)
|