| Index: pkg/dev_compiler/lib/js/common/dart_sdk.js
|
| diff --git a/pkg/dev_compiler/lib/js/common/dart_sdk.js b/pkg/dev_compiler/lib/js/common/dart_sdk.js
|
| index e3e5b33aa9823b526aeec448f479829712f6074b..10d0a8c19be4d1d9120b7bb825af451577d32a7a 100644
|
| --- a/pkg/dev_compiler/lib/js/common/dart_sdk.js
|
| +++ b/pkg/dev_compiler/lib/js/common/dart_sdk.js
|
| @@ -1864,11 +1864,12 @@
|
| if (ret.done) return ret.value;
|
| let future = ret.value;
|
| if (!dart.is(future, dart.getGenericClass(async.Future))) {
|
| - future = async.Future.value(future);
|
| + var result = future;
|
| + future = async.Future.microtask(() => result);
|
| }
|
| return future.then(dart.dynamic)(onValue, {onError: onError});
|
| }
|
| - return dart.getGenericClass(async.Future)(T).new(function() {
|
| + return dart.getGenericClass(async.Future)(T).microtask(function() {
|
| iter = gen.apply(null, args)[Symbol.iterator]();
|
| return onValue();
|
| });
|
|
|