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

Side by Side Diff: sdk/lib/io/list_stream_impl.dart

Issue 11361190: a === b -> identical(a, b) (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 8 years, 1 month 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/io/http_utils.dart ('k') | sdk/lib/io/socket_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 /** 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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 _scheduledNoPendingWriteCallback = null; 109 _scheduledNoPendingWriteCallback = null;
110 if (_clientNoPendingWriteHandler != null && 110 if (_clientNoPendingWriteHandler != null &&
111 !_streamMarkedClosed) { 111 !_streamMarkedClosed) {
112 _clientNoPendingWriteHandler(); 112 _clientNoPendingWriteHandler();
113 _checkScheduleCallbacks(); 113 _checkScheduleCallbacks();
114 } 114 }
115 } 115 }
116 116
117 void issueCloseCallback(Timer timer) { 117 void issueCloseCallback(Timer timer) {
118 _scheduledCloseCallback = null; 118 _scheduledCloseCallback = null;
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 &&
(...skipping 20 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 | « sdk/lib/io/http_utils.dart ('k') | sdk/lib/io/socket_stream_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698