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

Unified Diff: mojo/common/data_pipe_utils.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: review feedback Created 5 years, 8 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
« no previous file with comments | « no previous file | mojo/common/trace_controller_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/common/data_pipe_utils.cc
diff --git a/mojo/common/data_pipe_utils.cc b/mojo/common/data_pipe_utils.cc
index 09b600e3ef1212b4c9646b287212615e08d836e8..832db5d5d9b1284ed57e2a966aab360e320f0190 100644
--- a/mojo/common/data_pipe_utils.cc
+++ b/mojo/common/data_pipe_utils.cc
@@ -92,6 +92,8 @@ bool BlockingCopyFromString(const std::string& source,
char_buffer[byte_index++] = *it++;
}
EndWriteDataRaw(destination.get(), byte_index);
+ if (it == source.end())
+ return true;
} else if (result == MOJO_RESULT_SHOULD_WAIT) {
result = Wait(destination.get(), MOJO_HANDLE_SIGNAL_WRITABLE,
MOJO_DEADLINE_INDEFINITE, nullptr);
« no previous file with comments | « no previous file | mojo/common/trace_controller_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698