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

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

Issue 12328104: Change new List(n) to return fixed length list. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Merge to head. Created 7 years, 10 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 a77ebfa730f3874c19dd06196e38d6925b19e4e1..6c3f13ea5e91fbe9859916a01282b5134c72c0d0 100644
--- a/sdk/lib/io/websocket_impl.dart
+++ b/sdk/lib/io/websocket_impl.dart
@@ -447,7 +447,7 @@ class _WebSocketImpl extends Stream<Event> implements WebSocket {
Random random = new Random();
// Generate 16 random bytes.
- List<int> nonceData = new List<int>.fixedLength(16);
+ List<int> nonceData = new List<int>(16);
for (int i = 0; i < 16; i++) {
nonceData[i] = random.nextInt(256);
}
@@ -640,7 +640,7 @@ class _WebSocketImpl extends Stream<Event> implements WebSocket {
} else if (dataLength > 125) {
headerSize += 2;
}
- List<int> header = new List<int>.fixedLength(headerSize);
+ List<int> header = new List<int>(headerSize);
int index = 0;
// Set FIN and opcode.
header[index++] = 0x80 | opcode;

Powered by Google App Engine
This is Rietveld 408576698