| Index: sdk/lib/_internal/pub/lib/src/dart.dart
|
| diff --git a/sdk/lib/_internal/pub/lib/src/dart.dart b/sdk/lib/_internal/pub/lib/src/dart.dart
|
| index bf6cb2a169b369c20a89b7934aa84c10a212da8a..03bd0451c6dc46b89a47f0bfcaf855cc28d081b8 100644
|
| --- a/sdk/lib/_internal/pub/lib/src/dart.dart
|
| +++ b/sdk/lib/_internal/pub/lib/src/dart.dart
|
| @@ -127,11 +127,9 @@ Future runInIsolate(String code, message) {
|
| /// Adding an additional isolate in the middle works around this.
|
| void _isolateBuffer(message) {
|
| var replyTo = message['replyTo'];
|
| - // TODO(floitsch): If we do it right we shouldn't need to capture synchronous
|
| - // errors.
|
| - new Future.sync(() {
|
| - return Isolate.spawnUri(Uri.parse(message['uri']), [], message['message']);
|
| - }).then((_) => replyTo.send({'type': 'success'})).catchError((e, stack) {
|
| + Isolate.spawnUri(Uri.parse(message['uri']), [], message['message'])
|
| + .then((_) => replyTo.send({'type': 'success'}))
|
| + .catchError((e, stack) {
|
| replyTo.send({
|
| 'type': 'error',
|
| 'error': CrossIsolateException.serialize(e, stack)
|
|
|