commit | f10a01613c39b87f076d0f25581b26dbb1fb127f | [log] [tgz] |
---|---|---|
author | Gabriel Charette <gab@chromium.org> | Tue Jan 09 15:04:48 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Tue Jan 09 23:31:40 2018 |
tree | 97d6a6e98d194e6e5241920fa1e659d6156b4b68 | |
parent | 78fc4448c09e227447778a59ccd736f8d482037d [diff] |
Reland "Proper MessageLoop::IsIdleForTesting() that corresponds to the actual idleness criteria for MessageLoop." This is a reland of f9c93846970ae6ddd7b9cca352571bdd718ca43d Reverted because of https://crbug.com/799081 Original change's description: > Proper MessageLoop::IsIdleForTesting() that corresponds to the actual idleness criteria for MessageLoop. > > A pre-requirement for a simpler ScopedTaskEnvironment::RunUntilIdle() > implementation. In patchset 2 I initially considered still testing delayed_tasks() but without using TimeTicks::Now(). But that doesn't work either because MessagePump round robs between DoWork() and DoDelayedWork() and a condition met by the last task meant to be processed by DoWork() could technically occur before all ready delayed tasks are processed (regardless of flaky timing issues). Patch set 3 explicitly ignores delayed_tasks(). Still much better than the previous check which didn't even properly check the main work queue (ignored tasks already moved to triage_task()..!). ScopedTaskEnvironment::RunUntilIdle() could use the check in patch set 2 but it can't go in without at least fixing base::Timer (which doesn't cancel its tasks when deleted and cause delayed tasks to outlive their scope). In the meantime, we can add an explicit MessageLoop::HasReadyDelayedTasks() check. > R=fdoray@chromium.org > > Bug: 708584 > Change-Id: I6c35d72868ab313788c166c76e179c8cd3ace438 > Reviewed-on: https://chromium-review.googlesource.com/847752 > Reviewed-by: François Doray <fdoray@chromium.org> > Commit-Queue: Gabriel Charette <gab@chromium.org> > Cr-Commit-Position: refs/heads/master@{#526750} Bug: 708584 Change-Id: I72e0543578f0d6e4c8218d9eaebd33ca3d2f8e4a Reviewed-on: https://chromium-review.googlesource.com/856982 Reviewed-by: François Doray <fdoray@chromium.org> Commit-Queue: Wez <wez@chromium.org> Cr-Commit-Position: refs/heads/master@{#528163}
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 .