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

Unified Diff: runtime/bin/socket.cc

Issue 8372094: Renaming Array -> List in the VM API. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix test Created 9 years, 1 month 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: runtime/bin/socket.cc
diff --git a/runtime/bin/socket.cc b/runtime/bin/socket.cc
index 854abce4d6c2ba6f0b7cade32bb94ea581f43d12..51ad365d5017135a5c1dad1a39c5c72e84a83a25 100644
--- a/runtime/bin/socket.cc
+++ b/runtime/bin/socket.cc
@@ -39,13 +39,13 @@ void FUNCTION_NAME(Socket_ReadList)(Dart_NativeArguments args) {
DartUtils::GetIntegerInstanceField(Dart_GetNativeArgument(args, 0),
DartUtils::kIdFieldName);
Dart_Handle buffer_obj = Dart_GetNativeArgument(args, 1);
- ASSERT(Dart_IsArray(buffer_obj));
+ ASSERT(Dart_IsList(buffer_obj));
intptr_t offset =
DartUtils::GetIntegerValue(Dart_GetNativeArgument(args, 2));
intptr_t length =
DartUtils::GetIntegerValue(Dart_GetNativeArgument(args, 3));
intptr_t buffer_len = 0;
- Dart_Handle result = Dart_GetLength(buffer_obj, &buffer_len);
+ Dart_Handle result = Dart_ListLength(buffer_obj, &buffer_len);
ASSERT(Dart_IsValid(result));
ASSERT((offset + length) <= buffer_len);
@@ -56,7 +56,7 @@ void FUNCTION_NAME(Socket_ReadList)(Dart_NativeArguments args) {
uint8_t* buffer = new uint8_t[length];
intptr_t bytes_read = Socket::Read(socket, buffer, length);
if (bytes_read > 0) {
- Dart_Handle result = Dart_ArraySet(buffer_obj, offset, buffer, bytes_read);
+ Dart_Handle result = Dart_ListSet(buffer_obj, offset, buffer, bytes_read);
ASSERT(Dart_IsValid(result));
} else if (bytes_read < 0) {
bytes_read = 0;
@@ -73,13 +73,13 @@ void FUNCTION_NAME(Socket_WriteList)(Dart_NativeArguments args) {
DartUtils::GetIntegerInstanceField(Dart_GetNativeArgument(args, 0),
DartUtils::kIdFieldName);
Dart_Handle buffer_obj = Dart_GetNativeArgument(args, 1);
- ASSERT(Dart_IsArray(buffer_obj));
+ ASSERT(Dart_IsList(buffer_obj));
intptr_t offset =
DartUtils::GetIntegerValue(Dart_GetNativeArgument(args, 2));
intptr_t length =
DartUtils::GetIntegerValue(Dart_GetNativeArgument(args, 3));
intptr_t buffer_len = 0;
- Dart_Handle result = Dart_GetLength(buffer_obj, &buffer_len);
+ Dart_Handle result = Dart_ListLength(buffer_obj, &buffer_len);
ASSERT(Dart_IsValid(result));
ASSERT((offset + length) <= buffer_len);
@@ -88,7 +88,7 @@ void FUNCTION_NAME(Socket_WriteList)(Dart_NativeArguments args) {
}
uint8_t* buffer = new uint8_t[length];
- result = Dart_ArrayGet(buffer_obj, offset, buffer, length);
+ result = Dart_ListGet(buffer_obj, offset, buffer, length);
ASSERT(Dart_IsValid(result));
intptr_t total_bytes_written =
Socket::Write(socket, reinterpret_cast<void*>(buffer), length);
« no previous file with comments | « runtime/bin/process.cc ('k') | runtime/include/dart_api.h » ('j') | runtime/include/dart_api.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698