Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(553)

Issue 1566573002: Fix race on mojo message pump shutdown. (Closed)

Created:
4 years, 11 months ago by Anand Mistry (off Chromium)
Modified:
4 years, 11 months ago
Reviewers:
jam
CC:
chromium-reviews, qsr+mojo_chromium.org, vmpstr+watch_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, darin (slow to review), ben+mojo_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@mojo-waitset-message-pump
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix race on mojo message pump shutdown. Calling |MessagePump::Quit()| from a Thread's message loop races with any caller of |Thread::message_loop()| and |Thread::task_runner()| (see comment for |Thread::message_loop()|). This fixes the problem by allowing the mojo message pump to continue operating as a default message pump after the Mojo EDK has been shut down, allowing the normal thread shutdown process to occur. Committed: https://crrev.com/f575e10a19933cd251663358bd83639a8aa18ac4 Cr-Commit-Position: refs/heads/master@{#368536}

Patch Set 1 #

Patch Set 2 : Revert stuff. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+56 lines, -17 lines) Patch
M base/message_loop/message_loop.cc View 1 1 chunk +1 line, -6 lines 0 comments Download
M base/threading/thread_restrictions.h View 2 chunks +6 lines, -0 lines 0 comments Download
M mojo/message_pump/handle_watcher.cc View 1 1 chunk +0 lines, -5 lines 0 comments Download
M mojo/message_pump/message_pump_mojo.h View 3 chunks +7 lines, -0 lines 0 comments Download
M mojo/message_pump/message_pump_mojo.cc View 6 chunks +42 lines, -6 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 11 (3 generated)
Anand Mistry (off Chromium)
Ideally, I'd like to delete Thread::message_loop() and modify Thread::task_runner() to not cause issues with MessagePump::Quit(). ...
4 years, 11 months ago (2016-01-06 00:32:46 UTC) #2
jam
Thanks for the fix. Since there's no bug or repro instructions, I'm not sure I ...
4 years, 11 months ago (2016-01-07 00:38:05 UTC) #3
Anand Mistry (off Chromium)
On 2016/01/07 00:38:05, jam wrote: > Thanks for the fix. > > Since there's no ...
4 years, 11 months ago (2016-01-07 02:50:58 UTC) #4
jam
On 2016/01/07 02:50:58, Anand Mistry wrote: > On 2016/01/07 00:38:05, jam wrote: > > Thanks ...
4 years, 11 months ago (2016-01-08 17:47:37 UTC) #5
jam
lgtm
4 years, 11 months ago (2016-01-11 04:50:15 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1566573002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1566573002/20001
4 years, 11 months ago (2016-01-11 06:26:10 UTC) #8
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 11 months ago (2016-01-11 09:06:47 UTC) #9
commit-bot: I haz the power
4 years, 11 months ago (2016-01-11 09:08:51 UTC) #11
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/f575e10a19933cd251663358bd83639a8aa18ac4
Cr-Commit-Position: refs/heads/master@{#368536}

Powered by Google App Engine
This is Rietveld 408576698