commit | 757a6f7d888f2651d8030c3e9adb06d68eac1fb8 | [log] [tgz] |
---|---|---|
author | Sami Kyostila <skyostil@chromium.org> | Wed Dec 12 21:13:11 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Wed Dec 12 21:13:11 2018 |
tree | e3067045dc20a83c59f7f9d2c182b01cc0f693c8 | |
parent | 4cc2518facb66f4d33379561b18fa5dfb0abad12 [diff] |
sequence_manager: Don't stop processing tasks after RunLoop::Quit() This patch makes ThreadControllerWithMessagePumpImpl continue processing tasks even after the enclosing RunLoop has been quit. This is needed for MessageLoop compatibility in the following scenario: 1. A RunLoop is entered. 2. A native OS-level runloop is started, e.g., by opening a popup menu on Mac. Chrome tasks are allowed to executing in this nested loop. 3. A task is posted terminate the nested loop. 4. Before the above task has a chance to execute, a native callback calls RunLoop::Quit(). Because from Chrome's point of view there is no runloop nesting happening in the above scenario, RunLoop decides that it is the innermost one and tells ThreadControllerWithMessagePumpImpl to quit. However this doesn't terminate the OS-level loop and we get a live-lock. As Quit() is only supposed to affect RunLoop behavior instead of preventing tasks from getting executed, this patch changes ThreadControllerWithMessagePumpImpl to match the behavior of MessageLoop, i.e., allowing tasks to run after Quit(). Bug: 891670 Change-Id: I64fd335c122a0a6709f0c7222cfa1d3140a702e6 Reviewed-on: https://chromium-review.googlesource.com/c/1367660 Reviewed-by: Alex Clarke <alexclarke@chromium.org> Reviewed-by: Alexander Timin <altimin@chromium.org> Commit-Queue: Sami Kyöstilä <skyostil@chromium.org> Cr-Commit-Position: refs/heads/master@{#616043}
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 .