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

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

Issue 331993005: Rewrite Zone implementation to avoid recursively looking up stuff in the parent chain. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Inadvertent edit. Created 6 years, 5 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/schedule_microtask.dart ('k') | sdk/lib/async/timer.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 /** Abstract and private interface for a place to put events. */ 7 /** Abstract and private interface for a place to put events. */
8 abstract class _EventSink<T> { 8 abstract class _EventSink<T> {
9 void _add(T data); 9 void _add(T data);
10 void _addError(Object error, StackTrace stackTrace); 10 void _addError(Object error, StackTrace stackTrace);
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 void _onPause() { 293 void _onPause() {
294 assert(_isInputPaused); 294 assert(_isInputPaused);
295 } 295 }
296 296
297 void _onResume() { 297 void _onResume() {
298 assert(!_isInputPaused); 298 assert(!_isInputPaused);
299 } 299 }
300 300
301 Future _onCancel() { 301 Future _onCancel() {
302 assert(_isCanceled); 302 assert(_isCanceled);
303 return null;
303 } 304 }
304 305
305 // Handle pending events. 306 // Handle pending events.
306 307
307 /** 308 /**
308 * Add a pending event. 309 * Add a pending event.
309 * 310 *
310 * If the subscription is not paused, this also schedules a firing 311 * If the subscription is not paused, this also schedules a firing
311 * of pending events later (if necessary). 312 * of pending events later (if necessary).
312 */ 313 */
(...skipping 753 matching lines...) Expand 10 before | Expand all | Expand 10 after
1066 _Future<bool> hasNext = _futureOrPrefetch; 1067 _Future<bool> hasNext = _futureOrPrefetch;
1067 _clear(); 1068 _clear();
1068 hasNext._complete(false); 1069 hasNext._complete(false);
1069 return; 1070 return;
1070 } 1071 }
1071 _subscription.pause(); 1072 _subscription.pause();
1072 _futureOrPrefetch = null; 1073 _futureOrPrefetch = null;
1073 _state = _STATE_EXTRA_DONE; 1074 _state = _STATE_EXTRA_DONE;
1074 } 1075 }
1075 } 1076 }
OLDNEW
« no previous file with comments | « sdk/lib/async/schedule_microtask.dart ('k') | sdk/lib/async/timer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698