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

Unified Diff: runtime/bin/process.cc

Issue 22827002: Change the allocation of the stdout and stderr collected by Process.runSync (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Minor fixes Created 7 years, 4 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 | « runtime/bin/process.h ('k') | runtime/bin/process_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/process.cc
diff --git a/runtime/bin/process.cc b/runtime/bin/process.cc
index fe87daf0635fdd26292cda821b4c524cf124c63c..b14c02949616d91598115967fef0386bcc278c15 100644
--- a/runtime/bin/process.cc
+++ b/runtime/bin/process.cc
@@ -183,10 +183,10 @@ void FUNCTION_NAME(Process_Wait)(Dart_NativeArguments args) {
process_stderr,
exit_event,
&result)) {
- Dart_Handle out =
- IOBuffer::Create(result.stdout_data(), result.stdout_length());
- Dart_Handle err =
- IOBuffer::Create(result.stderr_data(), result.stderr_length());
+ Dart_Handle out = result.stdout_data();
+ if (Dart_IsError(out)) Dart_PropagateError(out);
+ Dart_Handle err = result.stderr_data();
+ if (Dart_IsError(err)) Dart_PropagateError(err);
Dart_Handle list = Dart_NewList(4);
Dart_ListSetAt(list, 0, Dart_NewInteger(pid));
Dart_ListSetAt(list, 1, Dart_NewInteger(result.exit_code()));
« no previous file with comments | « runtime/bin/process.h ('k') | runtime/bin/process_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698