| OLD | NEW |
| 1 part of dart.async; | 1 part of dart.async; |
| 2 abstract class Future<T> {static final _Future _nullFuture = new Future.value(n
ull); | 2 abstract class Future<T> {static final _Future _nullFuture = new _Future.immedi
ate(null); |
| 3 factory Future(computation()) { | 3 factory Future(computation()) { |
| 4 _Future result = new _Future<T>(); | 4 _Future result = new _Future<T>(); |
| 5 Timer.run(() { | 5 Timer.run(() { |
| 6 try { | 6 try { |
| 7 result._complete(computation()); | 7 result._complete(computation()); |
| 8 } | 8 } |
| 9 catch (e, s) { | 9 catch (e, s) { |
| 10 _completeWithErrorCallback(result, e, s); | 10 _completeWithErrorCallback(result, e, s); |
| 11 } | 11 } |
| 12 } | 12 } |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 void _completeWithErrorCallback(_Future result, error, stackTrace) { | 193 void _completeWithErrorCallback(_Future result, error, stackTrace) { |
| 194 AsyncError replacement = Zone.current.errorCallback(error, DEVC$RT.cast(stackTra
ce, dynamic, StackTrace, "DynamicCast", """line 719, column 62 of dart:async/fut
ure.dart: """, stackTrace is StackTrace, true)); | 194 AsyncError replacement = Zone.current.errorCallback(error, DEVC$RT.cast(stackTra
ce, dynamic, StackTrace, "DynamicCast", """line 719, column 62 of dart:async/fut
ure.dart: """, stackTrace is StackTrace, true)); |
| 195 if (replacement != null) { | 195 if (replacement != null) { |
| 196 error = _nonNullError(replacement.error); | 196 error = _nonNullError(replacement.error); |
| 197 stackTrace = replacement.stackTrace; | 197 stackTrace = replacement.stackTrace; |
| 198 } | 198 } |
| 199 result._completeError(error, DEVC$RT.cast(stackTrace, dynamic, StackTrace, "Dyn
amicCast", """line 724, column 32 of dart:async/future.dart: """, stackTrace is
StackTrace, true)); | 199 result._completeError(error, DEVC$RT.cast(stackTrace, dynamic, StackTrace, "Dyn
amicCast", """line 724, column 32 of dart:async/future.dart: """, stackTrace is
StackTrace, true)); |
| 200 } | 200 } |
| 201 Object _nonNullError(Object error) => (error != null) ? error : new NullThrownE
rror(); | 201 Object _nonNullError(Object error) => (error != null) ? error : new NullThrownE
rror(); |
| 202 typedef dynamic __CastType8(dynamic __u9); | 202 typedef dynamic __CastType8(dynamic __u9); |
| OLD | NEW |