Index: pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/generators.dart |
diff --git a/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/generators.dart b/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/generators.dart |
index a88138bab1b07aaf4b95cf1014194da0bdbeb3c1..090ec26b89e0345e41f67fef573ce7c48baf38ef 100644 |
--- a/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/generators.dart |
+++ b/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/generators.dart |
@@ -47,7 +47,7 @@ async_(gen, T, @rest args) => JS('', '''(() => { |
// Chain the Future so `await` receives the Future's value. |
return future.then($dynamic)(onValue, {onError: onError}); |
} |
- return ${getGenericClass(Future)}($T).new(function() { |
+ return ${getGenericClass(Future)}($T).microtask(function() { |
iter = $gen.apply(null, $args)[Symbol.iterator](); |
return onValue(); |
}); |