Index: sdk/lib/async/zone.dart |
diff --git a/sdk/lib/async/zone.dart b/sdk/lib/async/zone.dart |
index 225f5d13d69f380f04d66563b18dc573adf1b865..2520f4d73ba9bad0b19be3ce0910deb2269816c9 100644 |
--- a/sdk/lib/async/zone.dart |
+++ b/sdk/lib/async/zone.dart |
@@ -891,10 +891,14 @@ class _CustomZone extends _Zone { |
void _rootHandleUncaughtError( |
Zone self, ZoneDelegate parent, Zone zone, error, StackTrace stackTrace) { |
_schedulePriorityAsyncCallback(() { |
- throw new _UncaughtAsyncError(error, stackTrace); |
+ if (error == null) error = new NullThrownError(); |
turnidge
2015/10/02 21:00:53
Use {}'s here and below.
Lasse Reichstein Nielsen
2015/10/02 22:50:59
We don't generally do that (the surrounding code i
turnidge
2015/10/02 22:54:35
Acknowledged.
|
+ if (stackTrace == null) throw error; |
+ _rethrow(error, stackTrace); |
}); |
} |
+external void _rethrow(Object error, StackTrace stackTrace); |
Ivan Posva
2015/10/02 23:40:39
Nit: I think it would be better to match the signa
Lasse Reichstein Nielsen
2015/10/05 06:18:49
I think Object is the right type here - it's accep
|
+ |
dynamic _rootRun(Zone self, ZoneDelegate parent, Zone zone, f()) { |
if (Zone._current == zone) return f(); |
@@ -1009,26 +1013,6 @@ Zone _rootFork(Zone self, ZoneDelegate parent, Zone zone, |
return new _CustomZone(zone, specification, valueMap); |
} |
-class _RootZoneSpecification implements ZoneSpecification { |
- HandleUncaughtErrorHandler get handleUncaughtError => |
- _rootHandleUncaughtError; |
- RunHandler get run => _rootRun; |
- RunUnaryHandler get runUnary => _rootRunUnary; |
- RunBinaryHandler get runBinary => _rootRunBinary; |
- RegisterCallbackHandler get registerCallback => _rootRegisterCallback; |
- RegisterUnaryCallbackHandler get registerUnaryCallback => |
- _rootRegisterUnaryCallback; |
- RegisterBinaryCallbackHandler get registerBinaryCallback => |
- _rootRegisterBinaryCallback; |
- ErrorCallbackHandler get errorCallback => _rootErrorCallback; |
- ScheduleMicrotaskHandler get scheduleMicrotask => _rootScheduleMicrotask; |
- CreateTimerHandler get createTimer => _rootCreateTimer; |
- CreatePeriodicTimerHandler get createPeriodicTimer => |
- _rootCreatePeriodicTimer; |
- PrintHandler get print => _rootPrint; |
- ForkHandler get fork => _rootFork; |
-} |
turnidge
2015/10/02 21:00:53
What's all this about?
Lasse Reichstein Nielsen
2015/10/02 22:50:59
My editor told me the class was unused, so I remov
|
- |
class _RootZone extends _Zone { |
const _RootZone(); |