Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(643)

Issue 914813002: [App banners] Start addressing race conditions (Closed)

Created:
5 years, 10 months ago by gone
Modified:
5 years, 10 months ago
Reviewers:
Ted C, benwells
CC:
chromium-reviews, David Trainor- moved to gerrit, avayvod+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+110 lines, -26 lines) Patch
M chrome/android/java/src/org/chromium/chrome/browser/banners/AppBannerManager.java View 1 2 3 4 5 6 7 8 9 2 chunks +4 lines, -4 lines 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/banners/AppBannerManagerTest.java View 1 2 3 4 5 6 7 8 9 2 chunks +19 lines, -1 line 0 comments Download
M chrome/browser/android/banners/app_banner_manager.h View 1 2 3 4 5 6 7 8 9 10 4 chunks +16 lines, -9 lines 0 comments Download
M chrome/browser/android/banners/app_banner_manager.cc View 1 2 3 4 5 6 7 8 9 10 6 chunks +71 lines, -12 lines 0 comments Download

Messages

Total messages: 19 (6 generated)
gone
5 years, 10 months ago (2015-02-10 23:31:49 UTC) #2
gone
Added more tests.
5 years, 10 months ago (2015-02-12 19:23:47 UTC) #3
gone
Sending to benwells@ instead.
5 years, 10 months ago (2015-02-14 01:40:01 UTC) #5
benwells
https://codereview.chromium.org/914813002/diff/160001/chrome/browser/android/banners/app_banner_manager.cc File chrome/browser/android/banners/app_banner_manager.cc (right): https://codereview.chromium.org/914813002/diff/160001/chrome/browser/android/banners/app_banner_manager.cc#newcode58 chrome/browser/android/banners/app_banner_manager.cc:58: void Cancel(); This doesn't appear to be called by ...
5 years, 10 months ago (2015-02-16 01:58:43 UTC) #6
gone
https://chromiumcodereview.appspot.com/914813002/diff/160001/chrome/browser/android/banners/app_banner_manager.cc File chrome/browser/android/banners/app_banner_manager.cc (right): https://chromiumcodereview.appspot.com/914813002/diff/160001/chrome/browser/android/banners/app_banner_manager.cc#newcode58 chrome/browser/android/banners/app_banner_manager.cc:58: void Cancel(); On 2015/02/16 01:58:43, benwells wrote: > This ...
5 years, 10 months ago (2015-02-17 22:56:52 UTC) #7
benwells
lgtm, with the class decl moved. I think you should get someone who knows java ...
5 years, 10 months ago (2015-02-18 06:01:18 UTC) #8
gone
5 years, 10 months ago (2015-02-18 17:48:26 UTC) #11
gone
5 years, 10 months ago (2015-02-18 17:48:26 UTC) #12
Ted C
lgtm
5 years, 10 months ago (2015-02-18 17:54:47 UTC) #13
gone
https://chromiumcodereview.appspot.com/914813002/diff/180001/chrome/browser/android/banners/app_banner_manager.cc File chrome/browser/android/banners/app_banner_manager.cc (right): https://chromiumcodereview.appspot.com/914813002/diff/180001/chrome/browser/android/banners/app_banner_manager.cc#newcode58 chrome/browser/android/banners/app_banner_manager.cc:58: banners::AppBannerManager* delegate); On 2015/02/18 06:01:18, benwells wrote: > Nit: ...
5 years, 10 months ago (2015-02-18 18:33:29 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/914813002/200001
5 years, 10 months ago (2015-02-18 18:34:20 UTC) #17
commit-bot: I haz the power
Committed patchset #11 (id:200001)
5 years, 10 months ago (2015-02-18 19:32:45 UTC) #18
commit-bot: I haz the power
5 years, 10 months ago (2015-02-18 19:33:44 UTC) #19
Message was sent while issue was closed.
Patchset 11 (id:??) landed as
https://crrev.com/b4704eaa944bfd59f3397ef5ca9f892667a3bf87
Cr-Commit-Position: refs/heads/master@{#316875}

Powered by Google App Engine
This is Rietveld 408576698