| Index: bin/socket.cc
|
| ===================================================================
|
| --- bin/socket.cc (revision 18484)
|
| +++ bin/socket.cc (working copy)
|
| @@ -180,15 +180,18 @@
|
|
|
| intptr_t total_bytes_written = 0;
|
| intptr_t bytes_written = 0;
|
| - if (Dart_IsByteArrayExternal(buffer_obj)) {
|
| + if (Dart_IsExternalTypedData(buffer_obj) != kInvalid) {
|
| + Dart_TypedData_Type type;
|
| void* buffer = NULL;
|
| - result = Dart_ExternalByteArrayGetData(buffer_obj, &buffer);
|
| + intptr_t len;
|
| + result = Dart_TypedDataAcquireData(buffer_obj, &type, &buffer, &len);
|
| if (Dart_IsError(result)) {
|
| Dart_PropagateError(result);
|
| }
|
| buffer = static_cast<void*>((static_cast<uint8_t*>(buffer) + offset));
|
| bytes_written = Socket::Write(socket, buffer, length);
|
| if (bytes_written > 0) total_bytes_written = bytes_written;
|
| + Dart_TypedDataReleaseData(buffer_obj);
|
| } else {
|
| // Send data in chunks of maximum 16KB.
|
| const intptr_t max_chunk_length =
|
|
|