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

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

Issue 15764003: Add Zone support for Timers. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Reupload 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/event_loop.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 deprecatedFutureValue(_FutureImpl future) => 7 deprecatedFutureValue(_FutureImpl future) =>
8 future._isComplete ? future._resultOrListeners : null; 8 future._isComplete ? future._resultOrListeners : null;
9 9
10 abstract class _Completer<T> implements Completer<T> { 10 abstract class _Completer<T> implements Completer<T> {
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 _FutureListener _nextListener; 131 _FutureListener _nextListener;
132 final _FutureListener _listener; 132 final _FutureListener _listener;
133 133
134 _ErrorZoneBoundaryListener(this._listener); 134 _ErrorZoneBoundaryListener(this._listener);
135 135
136 bool _inSameErrorZone(_Zone otherZone) { 136 bool _inSameErrorZone(_Zone otherZone) {
137 // Should never be called. We use [_inSameErrorZone] to know if we have 137 // Should never be called. We use [_inSameErrorZone] to know if we have
138 // to insert an instance of [_ErrorZoneBoundaryListener] (and in the 138 // to insert an instance of [_ErrorZoneBoundaryListener] (and in the
139 // controller). Once we have inserted one we should never need to use it 139 // controller). Once we have inserted one we should never need to use it
140 // anymore. 140 // anymore.
141 // It would be valid to `return true` instead.
142 throw new UnsupportedError( 141 throw new UnsupportedError(
143 "A Zone boundary doesn't support the inSameErrorZone test."); 142 "A Zone boundary doesn't support the inSameErrorZone test.");
144 } 143 }
145 144
146 void _sendValue(value) { 145 void _sendValue(value) {
147 _listener._sendValue(value); 146 _listener._sendValue(value);
148 } 147 }
149 148
150 void _sendError(error) { 149 void _sendError(error) {
151 // We are not allowed to send an error from one error-zone to another. 150 // We are not allowed to send an error from one error-zone to another.
(...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after
654 _setError(error); 653 _setError(error);
655 }, onError: _setError); 654 }, onError: _setError);
656 return; 655 return;
657 } 656 }
658 } catch (e, s) { 657 } catch (e, s) {
659 error = _asyncError(e, s); 658 error = _asyncError(e, s);
660 } 659 }
661 _setError(error); 660 _setError(error);
662 } 661 }
663 } 662 }
OLDNEW
« no previous file with comments | « sdk/lib/async/event_loop.dart ('k') | sdk/lib/async/timer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698