Chromium Code Reviews| Index: runtime/lib/isolate_patch.dart |
| diff --git a/runtime/lib/isolate_patch.dart b/runtime/lib/isolate_patch.dart |
| index 3792a5b4d2ddbdee1d72446d80c67cae5cd82062..7757cfa79dba30f1810f9574153bc876db0e1b21 100644 |
| --- a/runtime/lib/isolate_patch.dart |
| +++ b/runtime/lib/isolate_patch.dart |
| @@ -241,8 +241,11 @@ patch class Isolate { |
| completer.complete(new Isolate._fromControlPort(controlPort)); |
| }; |
| } catch(e, st) { |
| - // TODO(14718): we want errors to go into the returned future. |
| - rethrow; |
| + // Don't complete immediately with an error, since the caller didn't |
| + // yet have the time to install an error handler. |
|
Ivan Posva
2013/12/12 12:11:49
time -> opportunity
floitsch
2013/12/12 21:08:37
Done.
|
| + scheduleMicrotask(() { |
| + completer.completeError(e, st); |
| + }); |
| }; |
| return completer.future; |
| } |
| @@ -261,8 +264,11 @@ patch class Isolate { |
| completer.complete(new Isolate._fromControlPort(controlPort)); |
| }; |
| } catch(e, st) { |
| - // TODO(14718): we want errors to go into the returned future. |
| - rethrow; |
| + // Don't complete immediately with an error, since the caller didn't |
| + // yet have the time to install an error handler. |
|
Ivan Posva
2013/12/12 12:11:49
ditto
floitsch
2013/12/12 21:08:37
Done.
|
| + scheduleMicrotask(() { |
| + completer.completeError(e, st); |
| + }); |
| }; |
| return completer.future; |
| } |