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

Side by Side Diff: sdk/lib/utf/utf_stream.dart

Issue 15989006: Revert until Windows crash is debugged. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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.utf; 5 part of dart.utf;
6 6
7 class _HelperStreamController<T> extends StreamController<T> {
8 final Function onPauseChanged;
9
10 _HelperStreamController(this.onPauseChanged);
11
12 void onPauseStateChange() {
13 onPauseChanged();
14 }
15 }
16
7 abstract class _StringDecoder 17 abstract class _StringDecoder
8 extends StreamEventTransformer<List<int>, String> { 18 extends StreamEventTransformer<List<int>, String> {
9 List<int> _carry; 19 List<int> _carry;
10 List<int> _buffer; 20 List<int> _buffer;
11 int _replacementChar; 21 int _replacementChar;
12 22
13 _StringDecoder(int this._replacementChar); 23 _StringDecoder(int this._replacementChar);
14 24
15 void handleData(List<int> bytes, EventSink<String> sink) { 25 void handleData(List<int> bytes, EventSink<String> sink) {
16 try { 26 try {
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 } 199 }
190 for (int i = additionalBytes; i > 0; i--) { 200 for (int i = additionalBytes; i > 0; i--) {
191 // 10xxxxxx (xxxxxx is next 6 bits from the top). 201 // 10xxxxxx (xxxxxx is next 6 bits from the top).
192 bytes.add(((charCode >> (6 * (i - 1))) & 0x3F) | 0x80); 202 bytes.add(((charCode >> (6 * (i - 1))) & 0x3F) | 0x80);
193 } 203 }
194 pos += additionalBytes + 1; 204 pos += additionalBytes + 1;
195 } 205 }
196 return bytes; 206 return bytes;
197 } 207 }
198 } 208 }
OLDNEW
« no previous file with comments | « sdk/lib/mdv_observe_impl/mdv_observe_impl.dart ('k') | tests/lib/async/stream_controller_async_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698