Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(212)

Unified Diff: sdk/lib/_internal/compiler/js_lib/js_helper.dart

Issue 947433002: Asyncstar - exception thrown before yield or await would not get caught (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Adress Review Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests/language/asyncstar_throw_in_catch_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/js_lib/js_helper.dart
diff --git a/sdk/lib/_internal/compiler/js_lib/js_helper.dart b/sdk/lib/_internal/compiler/js_lib/js_helper.dart
index c448cf5a389c53bc67e3ade9a5683cce0900432b..990c54190cbaae8918b8a9b3187de7c62c0020d8 100644
--- a/sdk/lib/_internal/compiler/js_lib/js_helper.dart
+++ b/sdk/lib/_internal/compiler/js_lib/js_helper.dart
@@ -3724,16 +3724,18 @@ class AsyncStarStreamController {
addError(error, stackTrace) => controller.addError(error, stackTrace);
close() => controller.close();
- AsyncStarStreamController(helperCallback) {
+ AsyncStarStreamController(body) {
controller = new StreamController(
onListen: () {
scheduleMicrotask(() {
- JS('', '#(#, null)', helperCallback, async_error_codes.SUCCESS);
+ Function wrapped = _wrapJsFunctionForAsync(body,
+ async_error_codes.SUCCESS);
+ wrapped(null);
});
},
onResume: () {
if (!isAdding) {
- asyncStarHelper(null, helperCallback, this);
+ asyncStarHelper(null, body, this);
}
}, onCancel: () {
stopRunning = true;
@@ -3741,8 +3743,8 @@ class AsyncStarStreamController {
}
}
-makeAsyncStarController(helperCallback) {
- return new AsyncStarStreamController(helperCallback);
+makeAsyncStarController(body) {
+ return new AsyncStarStreamController(body);
}
class IterationMarker {
« no previous file with comments | « no previous file | tests/language/asyncstar_throw_in_catch_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698