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

Side by Side Diff: sdk/lib/async/zone.dart

Issue 895813002: Tweak toString() for better type inference (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of dart.async; 5 part of dart.async;
6 6
7 typedef dynamic ZoneCallback(); 7 typedef dynamic ZoneCallback();
8 typedef dynamic ZoneUnaryCallback(arg); 8 typedef dynamic ZoneUnaryCallback(arg);
9 typedef dynamic ZoneBinaryCallback(arg1, arg2); 9 typedef dynamic ZoneBinaryCallback(arg1, arg2);
10 10
(...skipping 25 matching lines...) Expand all
36 ZoneSpecification specification, 36 ZoneSpecification specification,
37 Map zoneValues); 37 Map zoneValues);
38 38
39 /** Pair of error and stack trace. Returned by [Zone.errorCallback]. */ 39 /** Pair of error and stack trace. Returned by [Zone.errorCallback]. */
40 class AsyncError implements Error { 40 class AsyncError implements Error {
41 final error; 41 final error;
42 final StackTrace stackTrace; 42 final StackTrace stackTrace;
43 43
44 AsyncError(this.error, this.stackTrace); 44 AsyncError(this.error, this.stackTrace);
45 45
46 String toString() => error.toString(); 46 String toString() => '$error';
47 } 47 }
48 48
49 49
50 class _ZoneFunction { 50 class _ZoneFunction {
51 final _Zone zone; 51 final _Zone zone;
52 final Function function; 52 final Function function;
53 const _ZoneFunction(this.zone, this.function); 53 const _ZoneFunction(this.zone, this.function);
54 } 54 }
55 55
56 /** 56 /**
(...skipping 1187 matching lines...) Expand 10 before | Expand all | Expand 10 after
1244 handleUncaughtError: errorHandler); 1244 handleUncaughtError: errorHandler);
1245 } 1245 }
1246 Zone zone = Zone.current.fork(specification: zoneSpecification, 1246 Zone zone = Zone.current.fork(specification: zoneSpecification,
1247 zoneValues: zoneValues); 1247 zoneValues: zoneValues);
1248 if (onError != null) { 1248 if (onError != null) {
1249 return zone.runGuarded(body); 1249 return zone.runGuarded(body);
1250 } else { 1250 } else {
1251 return zone.run(body); 1251 return zone.run(body);
1252 } 1252 }
1253 } 1253 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/compiler/js_lib/js_helper.dart ('k') | sdk/lib/html/dart2js/html_dart2js.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698