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

Unified Diff: mojo/edk/system/message_pipe_test_utils.cc

Issue 779503003: Extract Awakable from Waiter (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Review Update Created 6 years 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: mojo/edk/system/message_pipe_test_utils.cc
diff --git a/mojo/edk/system/message_pipe_test_utils.cc b/mojo/edk/system/message_pipe_test_utils.cc
index e5df26da48d6d939c142872dbf09d008af5f3f17..e88ffd5216fd358468b2025749f8cb8866f47068 100644
--- a/mojo/edk/system/message_pipe_test_utils.cc
+++ b/mojo/edk/system/message_pipe_test_utils.cc
@@ -21,14 +21,15 @@ MojoResult WaitIfNecessary(scoped_refptr<MessagePipe> mp,
Waiter waiter;
waiter.Init();
- MojoResult add_result = mp->AddWaiter(0, &waiter, signals, 0, signals_state);
+ MojoResult add_result =
+ mp->AddAwakable(0, &waiter, signals, 0, signals_state);
if (add_result != MOJO_RESULT_OK) {
return (add_result == MOJO_RESULT_ALREADY_EXISTS) ? MOJO_RESULT_OK
: add_result;
}
MojoResult wait_result = waiter.Wait(MOJO_DEADLINE_INDEFINITE, nullptr);
- mp->RemoveWaiter(0, &waiter, signals_state);
+ mp->RemoveAwakable(0, &waiter, signals_state);
return wait_result;
}

Powered by Google App Engine
This is Rietveld 408576698