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

Side by Side Diff: tests/lib/async/catch_errors.dart

Issue 44113003: Fix indentation. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 library catch_errors; 1 library catch_errors;
2 2
3 import 'dart:async'; 3 import 'dart:async';
4 4
5 Stream catchErrors(void body()) { 5 Stream catchErrors(void body()) {
6 StreamController controller; 6 StreamController controller;
7 7
8 bool onError(e, st) { 8 bool onError(e, st) {
9 controller.add(e); 9 controller.add(e);
10 return true; 10 return true;
(...skipping 28 matching lines...) Expand all
39 } 39 }
40 }; 40 };
41 } 41 }
42 ScheduleMicrotaskHandler asyncHandler; 42 ScheduleMicrotaskHandler asyncHandler;
43 if (onScheduleMicrotask != null) { 43 if (onScheduleMicrotask != null) {
44 asyncHandler = (Zone self, ZoneDelegate parent, Zone zone, f()) { 44 asyncHandler = (Zone self, ZoneDelegate parent, Zone zone, f()) {
45 self.parent.runUnary(onScheduleMicrotask, () => zone.runGuarded(f)); 45 self.parent.runUnary(onScheduleMicrotask, () => zone.runGuarded(f));
46 }; 46 };
47 } 47 }
48 ZoneSpecification specification = 48 ZoneSpecification specification =
49 new ZoneSpecification(handleUncaughtError: errorHandler, 49 new ZoneSpecification(handleUncaughtError: errorHandler,
50 scheduleMicrotask: asyncHandler); 50 scheduleMicrotask: asyncHandler);
51 Zone zone = Zone.current.fork(specification: specification); 51 Zone zone = Zone.current.fork(specification: specification);
52 if (onError != null) { 52 if (onError != null) {
53 return zone.runGuarded(body); 53 return zone.runGuarded(body);
54 } else { 54 } else {
55 return zone.run(body); 55 return zone.run(body);
56 } 56 }
57 } 57 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698