Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 // Patch file for the dart:async library. | 5 // Patch file for the dart:async library. |
| 6 | 6 |
| 7 import 'dart:_js_helper' show | 7 import 'dart:_js_helper' show |
| 8 patch, | 8 patch, |
| 9 ExceptionAndStackTrace, | 9 ExceptionAndStackTrace, |
| 10 Primitives, | 10 Primitives, |
| 11 convertDartClosureToJS, | 11 convertDartClosureToJS, |
| 12 getTraceFromException, | 12 getTraceFromException, |
| 13 requiresPreamble, | 13 requiresPreamble, |
| 14 wrapException, | |
| 14 unwrapException; | 15 unwrapException; |
| 15 import 'dart:_isolate_helper' show | 16 import 'dart:_isolate_helper' show |
| 16 IsolateNatives, | 17 IsolateNatives, |
| 17 TimerImpl, | 18 TimerImpl, |
| 18 leaveJsAsync, | 19 leaveJsAsync, |
| 19 enterJsAsync, | 20 enterJsAsync, |
| 20 isWorker; | 21 isWorker; |
| 21 | 22 |
| 22 import 'dart:_foreign_helper' show JS; | 23 import 'dart:_foreign_helper' show JS; |
| 23 | 24 |
| (...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 502 // Each invocation should give a body with fresh state. | 503 // Each invocation should give a body with fresh state. |
| 503 final dynamic /* js function */ _outerHelper; | 504 final dynamic /* js function */ _outerHelper; |
| 504 | 505 |
| 505 _SyncStarIterable(this._outerHelper); | 506 _SyncStarIterable(this._outerHelper); |
| 506 | 507 |
| 507 Iterator get iterator => new _SyncStarIterator(JS('', '#()', _outerHelper)); | 508 Iterator get iterator => new _SyncStarIterator(JS('', '#()', _outerHelper)); |
| 508 } | 509 } |
| 509 | 510 |
| 510 @patch | 511 @patch |
| 511 void _rethrow(Object error, StackTrace stackTrace) { | 512 void _rethrow(Object error, StackTrace stackTrace) { |
| 512 throw new AsyncError(error, stackTrace); | 513 error = wrapException(error); |
| 514 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
| |
| 515 JS("void", "throw #", error); | |
| 513 } | 516 } |
| OLD | NEW |