The TaskQueueManager's internal::TaskQueue now has a priority
queue of delayed tasks. When these tasks are ready to
execute, they are enqueued on the normal task queue.
The main motivation for doing this is so that delayed
tasks posted from Blink can be properly flushed when the
scheduler shuts down. This is important because we would
otherwise risk leaving tasks allocated on the Blink Heap
that has gone away.
Benchmarking suggests that the overhead of this approach is
actually a bit lower than posting to the base MessageLoop
when posting lots of delayed tasks.
BUG=463143
Review URL: https://codereview.chromium.org/
1008693004
Cr-Commit-Position: refs/heads/master@{#321183}