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

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

Issue 17064008: Revert "Zone support for Futures." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 6 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 | « sdk/lib/async/future_impl.dart ('k') | sdk/lib/async/stream_impl.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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 // ------------------------------------------------------------------- 7 // -------------------------------------------------------------------
8 // Controller for creating and adding events to a stream. 8 // Controller for creating and adding events to a stream.
9 // ------------------------------------------------------------------- 9 // -------------------------------------------------------------------
10 10
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 } 350 }
351 } 351 }
352 352
353 typedef void _NotificationHandler(); 353 typedef void _NotificationHandler();
354 354
355 void _runGuarded(_NotificationHandler notificationHandler) { 355 void _runGuarded(_NotificationHandler notificationHandler) {
356 if (notificationHandler == null) return; 356 if (notificationHandler == null) return;
357 try { 357 try {
358 notificationHandler(); 358 notificationHandler();
359 } catch (e, s) { 359 } catch (e, s) {
360 _Zone.current.handleUncaughtError(_asyncError(e, s)); 360 _throwDelayed(e, s);
361 } 361 }
362 } 362 }
363 363
364 class _ControllerStream<T> extends _StreamImpl<T> { 364 class _ControllerStream<T> extends _StreamImpl<T> {
365 _StreamControllerLifecycle<T> _controller; 365 _StreamControllerLifecycle<T> _controller;
366 bool _hasListener = false; 366 bool _hasListener = false;
367 367
368 _ControllerStream(this._controller); 368 _ControllerStream(this._controller);
369 369
370 StreamSubscription<T> _createSubscription( 370 StreamSubscription<T> _createSubscription(
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
765 } 765 }
766 766
767 void _callOnCancel() { 767 void _callOnCancel() {
768 if (_hasPending) { 768 if (_hasPending) {
769 _pending.clear(); 769 _pending.clear();
770 _pending = null; 770 _pending = null;
771 } 771 }
772 super._callOnCancel(); 772 super._callOnCancel();
773 } 773 }
774 } 774 }
OLDNEW
« no previous file with comments | « sdk/lib/async/future_impl.dart ('k') | sdk/lib/async/stream_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698