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

Unified Diff: samples/total/src/TotalRunner.dart

Issue 9024008: Change the process API to be completely asynchronous. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Presubmit fixes Created 9 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: samples/total/src/TotalRunner.dart
diff --git a/samples/total/src/TotalRunner.dart b/samples/total/src/TotalRunner.dart
index fb660b2866d28bceb6d88a79da16b2c3e1a1bfa8..f6c1e05d91c63806c0925d5d59a48bdc5082f6c2 100755
--- a/samples/total/src/TotalRunner.dart
+++ b/samples/total/src/TotalRunner.dart
@@ -39,14 +39,12 @@ class ServerRunner {
ServerRunner(String this._serverMain);
void run(ExitCallback exitCallback) {
- Process dart = new Process(DART_EXEC_PATH, [_serverMain]);
+ Process dart = new Process.start(DART_EXEC_PATH, [_serverMain]);
dart.exitHandler = (int status) {
- dart.close();
- exitCallback(status, this);
- };
-
- dart.start();
+ dart.close();
+ exitCallback(status, this);
+ };
dart.stdout.dataHandler = () => readMore(dart.stdout, new StringBuffer());
dart.stderr.dataHandler = () => readMore(dart.stderr, new StringBuffer());

Powered by Google App Engine
This is Rietveld 408576698