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

Unified Diff: mojo/public/cpp/bindings/lib/connector.cc

Issue 1055703002: Gather trace data by waiting on handles with a fixed timeout (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 9 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: mojo/public/cpp/bindings/lib/connector.cc
diff --git a/mojo/public/cpp/bindings/lib/connector.cc b/mojo/public/cpp/bindings/lib/connector.cc
index 4f965ee2a448e50c6028382ba1300d50c11368d9..ebdcf38bdc3d7d248bac90c0cad4fe1f14e90554 100644
--- a/mojo/public/cpp/bindings/lib/connector.cc
+++ b/mojo/public/cpp/bindings/lib/connector.cc
@@ -45,14 +45,14 @@ ScopedMessagePipeHandle Connector::PassMessagePipe() {
return message_pipe_.Pass();
}
-bool Connector::WaitForIncomingMessage() {
+bool Connector::WaitForIncomingMessage(MojoDeadline deadline) {
if (error_)
return false;
- MojoResult rv = Wait(message_pipe_.get(),
- MOJO_HANDLE_SIGNAL_READABLE,
- MOJO_DEADLINE_INDEFINITE,
- nullptr);
+ MojoResult rv =
+ Wait(message_pipe_.get(), MOJO_HANDLE_SIGNAL_READABLE, deadline, nullptr);
+ if (rv == MOJO_RESULT_SHOULD_WAIT)
+ return false;
if (rv != MOJO_RESULT_OK) {
NotifyError();
return false;

Powered by Google App Engine
This is Rietveld 408576698