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

Unified Diff: lib/transformations/continuation.dart

Issue 2502943002: Fix parent pointer issue in async rewriter. (Closed)
Patch Set: Created 4 years, 1 month 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 | « lib/transformations/async.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/transformations/continuation.dart
diff --git a/lib/transformations/continuation.dart b/lib/transformations/continuation.dart
index 233da291346b3fe5877c5a7b6ee71c4946bf659f..751e2ac365ddb01d3fabb5056c34ea5a25093776 100644
--- a/lib/transformations/continuation.dart
+++ b/lib/transformations/continuation.dart
@@ -499,7 +499,8 @@ abstract class AsyncRewriterBase extends ContinuationRewriterBase {
loopBody.add(
new IfStatement(cond, new Block(newBody), new BreakStatement(labeled)));
labeled.body =
- new WhileStatement(new BoolLiteral(true), new Block(loopBody));
+ new WhileStatement(new BoolLiteral(true), new Block(loopBody))
+ ..parent = labeled;
statements.add(new Block(<Statement>[]
..addAll(temps)
..add(labeled)));
« no previous file with comments | « lib/transformations/async.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698