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

Side by Side Diff: utils/pub/error_group.dart

Issue 14070010: Refactor Future constructors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Added co19 issue number. Created 7 years, 8 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
« no previous file with comments | « utils/pub/entrypoint.dart ('k') | utils/pub/git.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 library error_group; 5 library error_group;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'utils.dart'; 9 import 'utils.dart';
10 10
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 onDone: onDone, 262 onDone: onDone,
263 cancelOnError: true); 263 cancelOnError: true);
264 } 264 }
265 265
266 /// Signal that an error from [_group] should be propagated through [this], 266 /// Signal that an error from [_group] should be propagated through [this],
267 /// unless it's already complete. 267 /// unless it's already complete.
268 void _signalError(var e) { 268 void _signalError(var e) {
269 if (_isDone) return; 269 if (_isDone) return;
270 _subscription.cancel(); 270 _subscription.cancel();
271 // Call these asynchronously to work around issue 7913. 271 // Call these asynchronously to work around issue 7913.
272 new Future.immediate(null).then((_) { 272 new Future.value().then((_) {
273 _controller.addError(e); 273 _controller.addError(e);
274 _controller.close(); 274 _controller.close();
275 }); 275 });
276 } 276 }
277 } 277 }
OLDNEW
« no previous file with comments | « utils/pub/entrypoint.dart ('k') | utils/pub/git.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698