commit | 26294d4e68751e61da8a4fe5fba13b4f96855ce4 | [log] [tgz] |
---|---|---|
author | Javier Ernesto Flores Robles <javierrobles@chromium.org> | Thu Dec 13 17:02:45 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Thu Dec 13 17:02:45 2018 |
tree | 45cee0a608f17c5ee24f32e1a2368d31b98b3388 | |
parent | ba5bf367eac3b25812c6e5af3c23cdc67a5b5344 [diff] |
Revert "base: Don't keep running tasks after nested run loop quits on iOS" This reverts commit 3ce69a991fd9ca03030738e324a1833c02462da0. Reason for revert: After revert of crrev.com/c/1375382 test MessageLoopTypedTest.QuitNow/default_pump_backend_SequenceManager started to fail on ios-simulator. See crbug.com/914842 Original change's description: > base: Don't keep running tasks after nested run loop quits on iOS > > The CoreFoundation message pump (MessagePumpCFRunLoop) scheduled an extra call > to Delegate::DoWork in the following scenario: > > 1. Start a run loop and schedule DoWork. > 2. In DoWork, start a second run nested run loop which quits immediately. > 3. After the nested run loop quits, schedule another DoWork which quits the > original run loop. > > After step #3, the message pump would call DoWork again because the nested > run loop triggered the execution of the nesting deferred work source. > > This patch fixes the issue by checking whether the further work is allowed > before calling DoWork. Note that this check can't be done just for the nested > deferred work source, because in the flow above that source is what triggers > the call to DoWork in step #3, i.e., the run loop hasn't quit yet at that point. > > The patch also includes a fix to > WebContentsViewMacInteractiveTest.SelectMenuLifetime; the test had the > following sequence in it (while a select menu is open): > > 1. Quit an outer run loop. > 2. Post a task onto an inner run loop to continue the test. > > The assumption here was that a select menu causes an inner run loop to > be active while the menu is open. This wasn't strictly correct: the > inner run loop is a native (CoreFoundation) run loop as opposed to a > base::RunLoop, which can't be explicitly exited with RunLoop::Quit(). > This means that the Quit() in step #1 affects the same run loop as the > PostTask in step #2, i.e., the task is prevented from running. > > This patch changes the test to only quit the test run loop after the > posted task (which closes the select menu) has run. > > Bug: 891670 > Change-Id: I6fe21289205664c4e1b1469547495667c753f56d > Reviewed-on: https://chromium-review.googlesource.com/c/1373754 > Reviewed-by: Mark Mentovai <mark@chromium.org> > Commit-Queue: Sami Kyöstilä <skyostil@chromium.org> > Cr-Commit-Position: refs/heads/master@{#615967} TBR=skyostil@chromium.org,mark@chromium.org Change-Id: Ia58acd52d4b147c38c1bbaa20b0d84f85dd65ca5 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 891670, 914842 Reviewed-on: https://chromium-review.googlesource.com/c/1375953 Commit-Queue: Javier Ernesto Flores Robles <javierrobles@chromium.org> Reviewed-by: Javier Ernesto Flores Robles <javierrobles@chromium.org> Cr-Commit-Position: refs/heads/master@{#616339}
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 .