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

Unified Diff: sdk/lib/async/future.dart

Issue 2893893002: Use generic functions in zones. (Closed)
Patch Set: Use `dynamic` as required return type. Created 3 years, 5 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/async/future.dart
diff --git a/sdk/lib/async/future.dart b/sdk/lib/async/future.dart
index b2f1c5a6af3dbd58788a9afde4708cb46a40c43a..2a17daf57c06938d8d10a2601fefa8ec1a693f53 100644
--- a/sdk/lib/async/future.dart
+++ b/sdk/lib/async/future.dart
@@ -519,7 +519,7 @@ abstract class Future<T> {
// context of all the previous iterations' callbacks.
// This avoids, e.g., deeply nested stack traces from the stack trace
// package.
- nextIteration = Zone.current.bindUnaryCallback((bool keepGoing) {
+ nextIteration = Zone.current.bindUnaryCallbackGuarded((bool keepGoing) {
while (keepGoing) {
FutureOr<bool> result;
try {
@@ -537,7 +537,7 @@ abstract class Future<T> {
keepGoing = result;
}
doneSignal._complete(null);
- }, runGuarded: true);
+ });
nextIteration(true);
return doneSignal;
}

Powered by Google App Engine
This is Rietveld 408576698