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

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: 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
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 4f970badadc918199ff78fd7e0cc496384e22483..b45b6c170d15a86b7a329913d5ac5067ac837d31 100644
--- a/sdk/lib/_internal/compiler/js_lib/js_helper.dart
+++ b/sdk/lib/_internal/compiler/js_lib/js_helper.dart
@@ -3729,16 +3729,17 @@ 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);
+ _wrapJsFunctionForAsync(body,
floitsch 2015/02/20 12:16:08 nit: the "(null)" drowns. maybe: Function wrapped
sigurdm 2015/02/23 12:33:49 Done.
+ async_error_codes.SUCCESS)(null);
});
},
onResume: () {
if (!isAdding) {
- asyncStarHelper(null, helperCallback, this);
+ asyncStarHelper(null, body, this);
}
}, onCancel: () {
stopRunning = true;
@@ -3746,8 +3747,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') | tests/language/asyncstar_throw_in_catch_test.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698