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

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

Issue 12473003: Remove deprecated StringBuffer.add, addAll and addCharCode. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 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
Index: sdk/lib/io/websocket_impl.dart
diff --git a/sdk/lib/io/websocket_impl.dart b/sdk/lib/io/websocket_impl.dart
index b7ca9a066c4832ad68d853317655f2aa801d3a01..3d14fa3f4ad185e33076de1559856c46aa8355af 100644
--- a/sdk/lib/io/websocket_impl.dart
+++ b/sdk/lib/io/websocket_impl.dart
@@ -186,7 +186,7 @@ class _WebSocketProtocolTransformer extends StreamEventTransformer {
throw new WebSocketException("Protocol error");
case _WebSocketMessageType.TEXT:
- _buffer.add(_decodeString(buffer.getRange(index, payload)));
+ _buffer.write(_decodeString(buffer.getRange(index, payload)));
index += payload;
if (_remainingPayloadBytes == 0) {
_messageFrameEnd(sink);
@@ -194,7 +194,7 @@ class _WebSocketProtocolTransformer extends StreamEventTransformer {
break;
case _WebSocketMessageType.BINARY:
- _buffer.add(buffer.getRange(index, payload));
+ _buffer.write(buffer.getRange(index, payload));
index += payload;
if (_remainingPayloadBytes == 0) {
_messageFrameEnd(sink);

Powered by Google App Engine
This is Rietveld 408576698