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

Unified Diff: ipc/ipc_sync_channel.cc

Issue 2540903002: Remove MessageLoop destruction observer from mojo::Watcher. (Closed)
Patch Set: . Created 4 years, 1 month 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
« no previous file with comments | « no previous file | mojo/android/system/watcher_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_sync_channel.cc
diff --git a/ipc/ipc_sync_channel.cc b/ipc/ipc_sync_channel.cc
index e2c6cdba9058b4c9de292105801a4d144bffb13d..979c6d3b0883c7e0eb22da2cac2fe78eed3e1eed 100644
--- a/ipc/ipc_sync_channel.cc
+++ b/ipc/ipc_sync_channel.cc
@@ -45,9 +45,8 @@ void OnSyncHandleReady(bool* signal, bool* error, MojoResult result) {
// is only used in cases where failure should be impossible) and runs
// |callback|.
void RunOnHandleReady(const base::Closure& callback, MojoResult result) {
- DCHECK(result == MOJO_RESULT_OK || result == MOJO_RESULT_ABORTED);
- if (result == MOJO_RESULT_OK)
- callback.Run();
+ DCHECK_EQ(result, MOJO_RESULT_OK);
+ callback.Run();
}
class PumpMessagesEvent {
@@ -679,11 +678,9 @@ void SyncChannel::WaitForReplyWithNestedMessageLoop(SyncContext* context) {
}
void SyncChannel::OnDispatchHandleReady(MojoResult result) {
- DCHECK(result == MOJO_RESULT_OK || result == MOJO_RESULT_ABORTED);
- if (result == MOJO_RESULT_OK) {
- sync_context()->GetDispatchEvent()->Reset();
- sync_context()->DispatchMessages();
- }
+ DCHECK_EQ(result, MOJO_RESULT_OK);
+ sync_context()->GetDispatchEvent()->Reset();
+ sync_context()->DispatchMessages();
}
void SyncChannel::StartWatching() {
« no previous file with comments | « no previous file | mojo/android/system/watcher_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698