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

Unified Diff: sdk/lib/_internal/js_runtime/lib/async_patch.dart

Issue 2867103004: Do not use _nullFuture in _asyncStart (Closed)
Patch Set: Created 3 years, 7 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/js_runtime/lib/async_patch.dart
diff --git a/sdk/lib/_internal/js_runtime/lib/async_patch.dart b/sdk/lib/_internal/js_runtime/lib/async_patch.dart
index f4ad69480378f8a7a67500db3a7d2d0d57138043..7ff200b6c32a8f6b8377278013cb38ae2827df16 100644
--- a/sdk/lib/_internal/js_runtime/lib/async_patch.dart
+++ b/sdk/lib/_internal/js_runtime/lib/async_patch.dart
@@ -138,12 +138,8 @@ class Timer {
/// Independently, it takes the [completer] and returns the future of the
/// completer for convenience of the transformed code.
dynamic _asyncStart(_WrappedAsyncBody bodyFunction, Completer completer) {
- // Expansion and specialization of `await null`.
- Function thenCallback =
- (result) => bodyFunction(async_error_codes.SUCCESS, result);
- // We can skip the zone registration, since the bodyFunction is already
- // registered (see [_wrapJsFunctionForAsync]).
- Future._nullFuture._thenNoZoneRegistration(thenCallback, null);
+ // TODO(sra): Specialize this implementation of `await null`.
+ _awaitOnObject(null, bodyFunction);
return completer.future;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698