| 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 7e1fe28b23b20bff770e2a8d7751b6e766294471..f85ccffd2ea8a84e5111c6b969dd19ad91605384 100644
|
| --- a/sdk/lib/_internal/pub/lib/src/dart.dart
|
| +++ b/sdk/lib/_internal/pub/lib/src/dart.dart
|
| @@ -123,11 +123,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)
|
|
|