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

Unified Diff: dart/tools/testing/dart/test_runner.dart

Issue 11233058: Update co19 to r397. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 2 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 | « dart/tools/testing/dart/test_progress.dart ('k') | deps/all.deps/DEPS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/tools/testing/dart/test_runner.dart
diff --git a/dart/tools/testing/dart/test_runner.dart b/dart/tools/testing/dart/test_runner.dart
index 5029a43f279dc101ee7a277f689077f82f47211f..f7b81862e9b996e97f5aa4046d20828010fea6c6 100644
--- a/dart/tools/testing/dart/test_runner.dart
+++ b/dart/tools/testing/dart/test_runner.dart
@@ -678,7 +678,7 @@ class RunningProcess {
}
// If the timeout fired in between two commands, kill the just
// started process immediately.
- if (timedOut) process.kill();
+ if (timedOut) safeKill(process);
});
processFuture.handleException((e) {
print("Process error:");
@@ -691,7 +691,17 @@ class RunningProcess {
void timeoutHandler(Timer unusedTimer) {
timedOut = true;
- if (process != null) process.kill();
+ safeKill(process);
+ }
+
+ void safeKill(Process p) {
+ if (p != null) {
+ try {
+ p.kill();
+ } on ProcessException {
+ // Hopefully, this means that the process died on its own.
+ }
+ }
}
}
« no previous file with comments | « dart/tools/testing/dart/test_progress.dart ('k') | deps/all.deps/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698