commit | 3919aa1b42669eadec4a8489c834edb710ea68c9 | [log] [tgz] |
---|---|---|
author | Gabriel Charette <gab@chromium.org> | Fri Jun 01 22:55:42 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Fri Jun 01 22:55:42 2018 |
tree | 2ea457d0c5f301461ac395c74e895267c59872b8 | |
parent | da620acb4996e3f839b5bf35c1c44b1187f40c7b [diff] |
[MessageLoop] Clear all pending tasks in TriageQueue::Clear This is a precursor to moving the |incoming_queue_| multi-threaded part of IncomingTaskQueue to MessageLoopTaskRunner to allow mocking the source of incoming tasks (i.e. for ScopedTaskEnvironment::MOCK_TIME on top of MLForUI/etc.). Such an interface will not have a notion of pre-triaged versus still-on-multi-threaded-queue tasks. What matters here is that TriageQueue::Clear() doesn't get stuck in a loop, the new logic clears all pending tasks while still backing out if destructors post more tasks. R=danakj@chromium.org, kylechar@chromium.org Bug: 708584 Change-Id: I8cd4f244718e4f5f74d5cb84138083ee37833238 Reviewed-on: https://chromium-review.googlesource.com/1078932 Commit-Queue: Gabriel Charette <gab@chromium.org> Reviewed-by: danakj <danakj@chromium.org> Reviewed-by: kylechar <kylechar@chromium.org> Cr-Commit-Position: refs/heads/master@{#563846}
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 .