Index: sdk/lib/async/zone.dart |
diff --git a/sdk/lib/async/zone.dart b/sdk/lib/async/zone.dart |
index de9af019e017a4c1a15d32e42531221e617cc0ef..0b5c21f4aa49b9f4801c154f0528732425fc42ff 100644 |
--- a/sdk/lib/async/zone.dart |
+++ b/sdk/lib/async/zone.dart |
@@ -943,8 +943,10 @@ void _rootScheduleMicrotask(Zone self, ZoneDelegate parent, Zone zone, f()) { |
if (!identical(_ROOT_ZONE, zone)) { |
bool hasErrorHandler = !_ROOT_ZONE.inSameErrorZone(zone); |
f = zone.bindCallback(f, runGuarded: hasErrorHandler); |
+ // Use root zone as event zone if the function is already bound. |
+ zone = _ROOT_ZONE; |
} |
- _scheduleAsyncCallback(f); |
+ _scheduleAsyncCallback(new _AsyncCallbackEntry(f, zone)); |
} |
Timer _rootCreateTimer(Zone self, ZoneDelegate parent, Zone zone, |