commit | 77d9d10c820b1344d57a48ea153877afed34436e | [log] [tgz] |
---|---|---|
author | Wez <wez@chromium.org> | Thu Jan 10 00:20:21 2019 |
committer | Commit Bot <commit-bot@chromium.org> | Thu Jan 10 00:20:21 2019 |
tree | 598514951a03c49cbf5dae6726febb7e0a2f3a71 | |
parent | 84062cc0378a16cb816e5cf14ed404a050119a12 [diff] |
Use a RefCountedData<AtomicFlag> in CancelableTaskTracker. If the MessageLoop from which CancelableTaskTracker is used is torn-down before the tracker, or its target TaskRunner, then the cancellation flags for outstanding tasks may be accessed after the tracker itself is gone. By adding ref-counting to the cancellation flags we ensure that they remain available for as long as the posted task, the reply, or the tracker, needs them. We also remove the WeakPtrFactory from the CancelableTaskTracker, since the Untrack() operations it was used to guard can instead be guarded by the cancelation flags of each associated task. Bug: 918948 Change-Id: I44a8356ecd970b7cedd1bbd2a6957c2707716bfc Reviewed-on: https://chromium-review.googlesource.com/c/1398392 Commit-Queue: Wez <wez@chromium.org> Reviewed-by: Gabriel Charette <gab@chromium.org> Cr-Commit-Position: refs/heads/master@{#621388}
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.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .