Chromium Code Reviews| Index: runtime/bin/socket_impl.dart |
| =================================================================== |
| --- runtime/bin/socket_impl.dart (revision 3621) |
| +++ runtime/bin/socket_impl.dart (working copy) |
| @@ -309,12 +309,14 @@ |
| // When using the Dart C API access to ObjectArray by index is |
| // currently much faster. This function will make a copy of the |
| // supplied List to an ObjectArray if it isn't already. |
| - ObjectArray outBuffer; |
| + List<int> outBuffer; |
|
cshapiro
2012/01/27 23:00:04
I think this can safely be retyped as a ByteArray
Anders Johnsen
2012/01/27 23:42:39
The thing is, that both a ByteArray and an ObjectA
|
| int outOffset = offset; |
| if (buffer is ObjectArray) { |
| outBuffer = buffer; |
| + } else if (buffer is ByteArray) { |
| + outBuffer = buffer; |
| } else { |
| - outBuffer = new ObjectArray(bytes); |
| + outBuffer = new ByteArray(bytes); |
| outOffset = 0; |
| int j = offset; |
| for (int i = 0; i < bytes; i++) { |