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

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

Issue 3005813002: Relanding test block 170 migration. (Closed)
Patch Set: Created 3 years, 3 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
« no previous file with comments | « no previous file | tests/lib_2/lib_2_dart2js.status » ('j') | 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 <<<<<<< HEAD
6 Stream catchErrors(dynamic body()) {
7 =======
8 Stream catchErrors(void body()) { 5 Stream catchErrors(void body()) {
9 >>>>>>> Migrated test block 170 to Dart 2.0.
10 StreamController controller; 6 StreamController controller;
11 7
12 bool onError(e, st) { 8 bool onError(e, st) {
13 controller.add(e); 9 controller.add(e);
14 return true; 10 return true;
15 } 11 }
16 12
17 void onListen() { 13 void onListen() {
18 runZoned(body, onError: onError); 14 runZoned(body, onError: onError);
19 } 15 }
(...skipping 30 matching lines...) Expand all
50 } 46 }
51 ZoneSpecification specification = new ZoneSpecification( 47 ZoneSpecification specification = new ZoneSpecification(
52 handleUncaughtError: errorHandler, scheduleMicrotask: asyncHandler); 48 handleUncaughtError: errorHandler, scheduleMicrotask: asyncHandler);
53 Zone zone = Zone.current.fork(specification: specification); 49 Zone zone = Zone.current.fork(specification: specification);
54 if (onError != null) { 50 if (onError != null) {
55 return zone.runGuarded(body); 51 return zone.runGuarded(body);
56 } else { 52 } else {
57 return zone.run(body); 53 return zone.run(body);
58 } 54 }
59 } 55 }
OLDNEW
« no previous file with comments | « no previous file | tests/lib_2/lib_2_dart2js.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698