| 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);
|
| }
|
|
|