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

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

Issue 637893002: Use a _FutureListener separate from the _Future to hold listeners. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Don't check that source is complete, it always is. Created 6 years, 2 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
« sdk/lib/async/future_impl.dart ('K') | « sdk/lib/async/schedule_microtask.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/async/zone.dart
diff --git a/sdk/lib/async/zone.dart b/sdk/lib/async/zone.dart
index 01192c8e4efaa4a8b6906a833e77974fe0efa7cf..d22f5ba832f5a6ef4e1dbc53fbc784d3ad34fc95 100644
--- a/sdk/lib/async/zone.dart
+++ b/sdk/lib/async/zone.dart
@@ -607,7 +607,8 @@ abstract class _Zone implements Zone {
Map get _map;
bool inSameErrorZone(Zone otherZone) {
- return identical(errorZone, otherZone.errorZone);
+ return identical(this, otherZone) ||
+ identical(errorZone, otherZone.errorZone);
}
}
@@ -940,7 +941,8 @@ AsyncError _rootErrorCallback(Zone self, ZoneDelegate parent, Zone zone,
void _rootScheduleMicrotask(Zone self, ZoneDelegate parent, Zone zone, f()) {
if (!identical(_ROOT_ZONE, zone)) {
- f = zone.bindCallback(f);
+ bool hasErrorHandler = !_ROOT_ZONE.inSameErrorZone(zone);
+ f = zone.bindCallback(f, runGuarded: hasErrorHandler);
}
_scheduleAsyncCallback(f);
}
« sdk/lib/async/future_impl.dart ('K') | « sdk/lib/async/schedule_microtask.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698