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

Side by Side Diff: test/generated_sdk/lib/async/stream_pipe.dart

Issue 1112403004: SDK fixes (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Formatting fix Created 5 years, 7 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
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 /** Runs user code and takes actions depending on success or failure. */ 7 /** Runs user code and takes actions depending on success or failure. */
8 _runUserCode(userCode(), 8 _runUserCode(userCode(),
9 onSuccess(value), 9 onSuccess(value),
10 onError(error, StackTrace stackTrace)) { 10 onError(error, StackTrace stackTrace)) {
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 Function onError, 93 Function onError,
94 void onDone(), 94 void onDone(),
95 bool cancelOnError) { 95 bool cancelOnError) {
96 return new _ForwardingStreamSubscription<S, T>( 96 return new _ForwardingStreamSubscription<S, T>(
97 this, onData, onError, onDone, cancelOnError); 97 this, onData, onError, onDone, cancelOnError);
98 } 98 }
99 99
100 // Override the following methods in subclasses to change the behavior. 100 // Override the following methods in subclasses to change the behavior.
101 101
102 void _handleData(S data, _EventSink<T> sink) { 102 void _handleData(S data, _EventSink<T> sink) {
103 var outputData = data; 103 dynamic outputData = data;
104 sink._add(outputData); 104 sink._add(outputData);
105 } 105 }
106 106
107 void _handleError(error, StackTrace stackTrace, _EventSink<T> sink) { 107 void _handleError(error, StackTrace stackTrace, _EventSink<T> sink) {
108 sink._addError(error, stackTrace); 108 sink._addError(error, stackTrace);
109 } 109 }
110 110
111 void _handleDone(_EventSink<T> sink) { 111 void _handleDone(_EventSink<T> sink) {
112 sink._close(); 112 sink._close();
113 } 113 }
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 _addErrorWithReplacement(sink, e, s); 429 _addErrorWithReplacement(sink, e, s);
430 return null; 430 return null;
431 } 431 }
432 if (!isEqual) { 432 if (!isEqual) {
433 sink._add(inputEvent); 433 sink._add(inputEvent);
434 _previous = inputEvent; 434 _previous = inputEvent;
435 } 435 }
436 } 436 }
437 } 437 }
438 } 438 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698