Index: lib/src/dart.dart |
diff --git a/lib/src/dart.dart b/lib/src/dart.dart |
index 4dce4b5923a7b62c94db981555a4748b570c9561..31beb9d2a98332d86595a491058c2a0eba7ea746 100644 |
--- a/lib/src/dart.dart |
+++ b/lib/src/dart.dart |
@@ -36,7 +36,7 @@ Future<Isolate> runInIsolate(String code, message, {packageRoot}) { |
}).then((isolate) { |
return port.first.then((response) { |
if (response['type'] != 'error') return isolate; |
- isolate.kill(); |
+ if (supportsIsolateKill) isolate.kill(); |
var asyncError = RemoteException.deserialize(response['error']); |
return new Future.error(asyncError.error, asyncError.stackTrace); |
}); |