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

Side by Side Diff: runtime/bin/list_stream_impl.dart

Issue 11238035: Make isEmpty a getter. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update status file with co19 issue number. Created 8 years, 2 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 | « runtime/bin/http_impl.dart ('k') | runtime/bin/path_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 /** 5 /**
6 * Default implementation of [ListInputStream]. 6 * Default implementation of [ListInputStream].
7 */ 7 */
8 class _ListInputStream extends _BaseDataInputStream implements ListInputStream { 8 class _ListInputStream extends _BaseDataInputStream implements ListInputStream {
9 _ListInputStream() : _bufferList = new _BufferList(); 9 _ListInputStream() : _bufferList = new _BufferList();
10 10
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 if (_clientCloseHandler !== null) _clientCloseHandler(); 119 if (_clientCloseHandler !== null) _clientCloseHandler();
120 } 120 }
121 121
122 // Schedule no pending callback if there is a callback set as this 122 // Schedule no pending callback if there is a callback set as this
123 // output stream does not wait for any transmission. Schedule 123 // output stream does not wait for any transmission. Schedule
124 // close callback once when the stream is closed. Only schedule a 124 // close callback once when the stream is closed. Only schedule a
125 // new callback if the previous one has actually been called. 125 // new callback if the previous one has actually been called.
126 if (_closeCallbackCalled) return; 126 if (_closeCallbackCalled) return;
127 127
128 if (!_streamMarkedClosed) { 128 if (!_streamMarkedClosed) {
129 if (!_bufferList.isEmpty() && 129 if (!_bufferList.isEmpty &&
130 _clientDataHandler != null && 130 _clientDataHandler != null &&
131 _scheduledDataCallback == null) { 131 _scheduledDataCallback == null) {
132 _scheduledDataCallback = new Timer(0, issueDataCallback); 132 _scheduledDataCallback = new Timer(0, issueDataCallback);
133 } 133 }
134 134
135 if (_clientNoPendingWriteHandler != null && 135 if (_clientNoPendingWriteHandler != null &&
136 _scheduledNoPendingWriteCallback == null && 136 _scheduledNoPendingWriteCallback == null &&
137 _scheduledDataCallback == null) { 137 _scheduledDataCallback == null) {
138 _scheduledNoPendingWriteCallback = 138 _scheduledNoPendingWriteCallback =
139 new Timer(0, issueNoPendingWriteCallback); 139 new Timer(0, issueNoPendingWriteCallback);
(...skipping 10 matching lines...) Expand all
150 _BufferList _bufferList; 150 _BufferList _bufferList;
151 bool _streamMarkedClosed = false; 151 bool _streamMarkedClosed = false;
152 bool _closeCallbackCalled = false; 152 bool _closeCallbackCalled = false;
153 Timer _scheduledDataCallback; 153 Timer _scheduledDataCallback;
154 Timer _scheduledNoPendingWriteCallback; 154 Timer _scheduledNoPendingWriteCallback;
155 Timer _scheduledCloseCallback; 155 Timer _scheduledCloseCallback;
156 Function _clientDataHandler; 156 Function _clientDataHandler;
157 Function _clientNoPendingWriteHandler; 157 Function _clientNoPendingWriteHandler;
158 Function _clientCloseHandler; 158 Function _clientCloseHandler;
159 } 159 }
OLDNEW
« no previous file with comments | « runtime/bin/http_impl.dart ('k') | runtime/bin/path_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698