[Jobs API]: Fix use-after-free.
It's possible for a thread to re-enqueue a JobTaskSource right before the job is canceled/joined and will sill end up in the queue (the main thread may try to remove it before it's added again). The fix is simply to avoid calling user callback if the job has the cancel bit set. In addition, a job that's joined needs to be marked as canceled. Bug: 1120686 Change-Id: I1ca9458a22eda71c400cfb6f0ef42efc85e38e86 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2369435Reviewed-by:François Doray <fdoray@chromium.org> Commit-Queue: Etienne Pierre-Doray <etiennep@chromium.org> Cr-Commit-Position: refs/heads/master@{#800730}
Showing
Please register or sign in to comment