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

Unified Diff: sdk/lib/io/string_transformer.dart

Issue 16125005: Make new StreamController be async by default. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address review comments 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sdk/lib/io/secure_socket.dart ('k') | sdk/lib/io/websocket_impl.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/io/string_transformer.dart
diff --git a/sdk/lib/io/string_transformer.dart b/sdk/lib/io/string_transformer.dart
index ec6d0e2d03e9efa6de3a67cc7661a0a4098e84a1..f127b38ab39aaf010359ffbc4f292ed06b97fb9e 100644
--- a/sdk/lib/io/string_transformer.dart
+++ b/sdk/lib/io/string_transformer.dart
@@ -186,7 +186,7 @@ String _decodeString(List<int> bytes, [Encoding encoding = Encoding.UTF_8]) {
if (bytes.length == 0) return "";
var string;
var error;
- var controller = new StreamController();
+ var controller = new StreamController(sync: true);
controller.stream
.transform(new StringDecoder(encoding))
.listen((data) => string = data,
@@ -205,7 +205,7 @@ String _decodeUtf8Strict(List<int> bytes) {
if (bytes.length == 0) return "";
var string;
var error;
- var controller = new StreamController();
+ var controller = new StreamController(sync: true);
controller.stream
.transform(new Utf8DecoderTransformer(null))
.listen((data) => string = data,
@@ -223,7 +223,7 @@ String _decodeUtf8Strict(List<int> bytes) {
List<int> _encodeString(String string, [Encoding encoding = Encoding.UTF_8]) {
if (string.length == 0) return [];
var bytes;
- var controller = new StreamController();
+ var controller = new StreamController(sync: true);
controller.stream
.transform(new StringEncoder(encoding))
.listen((data) => bytes = data);
« no previous file with comments | « sdk/lib/io/secure_socket.dart ('k') | sdk/lib/io/websocket_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698