Description[Reading List] Check web state after the distillation delay.
It is possible that the web state has been released before the timeout
of the timer.
If this is the case, it means that the distillation was aborted.
Early return in that case.
There is no Cancelable delayed task. As the current situation is simple (only one
task is running at a time), store the ID of the task, and increment it when cancelling.
This is inspired by RunIfNotCanceled, but adapted to this much simpler situation.
Check the current ID when the task runs. If the ID was incremented, the task is cancelled.
BUG=695493
Review-Url: https://codereview.chromium.org/2717483003
Cr-Commit-Position: refs/heads/master@{#452540}
(cherry picked from commit d7e66510bedbf95d90337071155f8b07036cb002)
Review-Url: https://codereview.chromium.org/2724583002 .
Cr-Commit-Position: refs/branch-heads/2987@{#713}
Cr-Branched-From: ad51088c0e8776e8dcd963dbe752c4035ba6dab6-refs/heads/master@{#444943}
Committed: https://chromium.googlesource.com/chromium/src/+/ffaa9b73b76d5c15755975266f94948413b7389a
Patch Set 1 #
Messages
Total messages: 2 (1 generated)
|