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

Unified Diff: runtime/bin/socket.cc

Issue 23540002: Get rid of some downcasts (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 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
« no previous file with comments | « runtime/bin/process.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/socket.cc
diff --git a/runtime/bin/socket.cc b/runtime/bin/socket.cc
index 13467afd737cc46c4368dbb7aa2e3ed2d5324670..cd582eb201bf06efff68e9b21e5074f8d0a785c7 100644
--- a/runtime/bin/socket.cc
+++ b/runtime/bin/socket.cc
@@ -186,9 +186,9 @@ void FUNCTION_NAME(Socket_WriteList)(Dart_NativeArguments args) {
Dart_Handle buffer_obj = Dart_GetNativeArgument(args, 1);
ASSERT(Dart_IsList(buffer_obj));
intptr_t offset =
- DartUtils::GetIntegerValue(Dart_GetNativeArgument(args, 2));
+ DartUtils::GetIntptrValue(Dart_GetNativeArgument(args, 2));
intptr_t length =
- DartUtils::GetIntegerValue(Dart_GetNativeArgument(args, 3));
+ DartUtils::GetIntptrValue(Dart_GetNativeArgument(args, 3));
if (short_socket_writes) {
length = (length + 1) / 2;
}
@@ -276,7 +276,7 @@ void FUNCTION_NAME(Socket_GetType)(Dart_NativeArguments args) {
void FUNCTION_NAME(Socket_GetStdioHandle)(Dart_NativeArguments args) {
Dart_Handle socket_obj = Dart_GetNativeArgument(args, 0);
intptr_t num =
- DartUtils::GetIntegerValue(Dart_GetNativeArgument(args, 1));
+ DartUtils::GetIntptrValue(Dart_GetNativeArgument(args, 1));
ASSERT(num == 0 || num == 1 || num == 2);
intptr_t socket = Socket::GetStdioHandle(num);
Dart_Handle err = Socket::SetSocketIdNativeField(socket_obj, socket);
« no previous file with comments | « runtime/bin/process.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698