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

Side by Side Diff: test/dart_codegen/expect/async/future.dart

Issue 1112403004: SDK fixes (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Formatting fix Created 5 years, 7 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 unified diff | Download patch
OLDNEW
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
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);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698