Chromium Code Reviews| Index: sdk/lib/_internal/js_runtime/lib/async_patch.dart |
| diff --git a/sdk/lib/_internal/js_runtime/lib/async_patch.dart b/sdk/lib/_internal/js_runtime/lib/async_patch.dart |
| index 1155e79f76964886ed61ab0c2006b9ed1c5e292f..450e30b434f693ac6a32b88f95bfb8c45ada91aa 100644 |
| --- a/sdk/lib/_internal/js_runtime/lib/async_patch.dart |
| +++ b/sdk/lib/_internal/js_runtime/lib/async_patch.dart |
| @@ -11,6 +11,7 @@ import 'dart:_js_helper' show |
| convertDartClosureToJS, |
| getTraceFromException, |
| requiresPreamble, |
| + wrapException, |
| unwrapException; |
| import 'dart:_isolate_helper' show |
| IsolateNatives, |
| @@ -509,5 +510,7 @@ class _SyncStarIterable extends IterableBase { |
| @patch |
| void _rethrow(Object error, StackTrace stackTrace) { |
| - throw new AsyncError(error, stackTrace); |
| + error = wrapException(error); |
| + JS("void", "#.stack = #", error, stackTrace.toString()); |
|
Siggi Cherem (dart-lang)
2015/10/05 17:09:33
I'm not super familiar with this logic yet, but I
Lasse Reichstein Nielsen
2015/10/06 07:57:26
As I understand it, the "generally accepted" behav
|
| + JS("void", "throw #", error); |
| } |