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

Unified Diff: bin/unittest.dart

Issue 948113004: Support Dart 1.8.0. (Closed) Base URL: git@github.com:dart-lang/unittest@master
Patch Set: Created 5 years, 10 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 | lib/src/dart.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bin/unittest.dart
diff --git a/bin/unittest.dart b/bin/unittest.dart
index 32379360ede09b5aed01667ce2a31f0a29586d20..3e16498d93d19e1e7cef646300d55efab65a8bb8 100644
--- a/bin/unittest.dart
+++ b/bin/unittest.dart
@@ -13,6 +13,7 @@ import 'package:stack_trace/stack_trace.dart';
import 'package:unittest/src/console_reporter.dart';
import 'package:unittest/src/exit_codes.dart' as exit_codes;
+import 'package:unittest/src/io.dart';
import 'package:unittest/src/load_exception.dart';
import 'package:unittest/src/loader.dart';
import 'package:unittest/src/utils.dart';
@@ -85,7 +86,13 @@ void main(List<String> args) {
"with the stack trace and instructions for reproducing the error.");
exitCode = exit_codes.software;
}
- }).whenComplete(() => loader.close());
+ }).whenComplete(() {
+ return loader.close().then((_) {
+ // If we're on a Dart version that doesn't support Isolate.kill(), we have
+ // to manually exit so that dangling isolates don't prevent it.
+ if (!supportsIsolateKill) exit(exitCode);
+ });
+ });
}
/// Print usage information for this command.
« no previous file with comments | « no previous file | lib/src/dart.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698