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

Unified Diff: ipc/ipc_sync_channel.cc

Issue 2725133002: Mojo: Armed Watchers (Closed)
Patch Set: . Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ipc/ipc_sync_channel.cc
diff --git a/ipc/ipc_sync_channel.cc b/ipc/ipc_sync_channel.cc
index f92d1edd772b347966dde4232dde699fba5b77d6..18721f05f6be161e03a6244011f55de75c1af044 100644
--- a/ipc/ipc_sync_channel.cc
+++ b/ipc/ipc_sync_channel.cc
@@ -526,7 +526,7 @@ SyncChannel::SyncChannel(
WaitableEvent* shutdown_event)
: ChannelProxy(new SyncContext(listener, ipc_task_runner, shutdown_event)),
sync_handle_registry_(mojo::SyncHandleRegistry::current()),
- dispatch_watcher_(FROM_HERE) {
+ dispatch_watcher_(FROM_HERE, mojo::Watcher::ArmingPolicy::AUTOMATIC) {
// The current (listener) thread must be distinct from the IPC thread, or else
// sending synchronous messages will deadlock.
DCHECK_NE(ipc_task_runner.get(), base::ThreadTaskRunnerHandle::Get().get());
@@ -642,7 +642,8 @@ void SyncChannel::WaitForReply(mojo::SyncHandleRegistry* registry,
}
void SyncChannel::WaitForReplyWithNestedMessageLoop(SyncContext* context) {
- mojo::Watcher send_done_watcher(FROM_HERE);
+ mojo::Watcher send_done_watcher(FROM_HERE,
+ mojo::Watcher::ArmingPolicy::AUTOMATIC);
ReceivedSyncMsgQueue* sync_msg_queue = context->received_sync_msgs();
DCHECK_NE(sync_msg_queue, nullptr);

Powered by Google App Engine
This is Rietveld 408576698