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

Unified Diff: runtime/bin/secure_socket.cc

Issue 113923004: Only store the address bytes for an internet address in Dart (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years 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/io_natives.cc ('k') | runtime/bin/socket.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/secure_socket.cc
diff --git a/runtime/bin/secure_socket.cc b/runtime/bin/secure_socket.cc
index 6fa0a9975dbcefb9384a8f92e541f433642a30c5..4bcaa732a9e0b6610d6d750d9a71778a80456286 100644
--- a/runtime/bin/secure_socket.cc
+++ b/runtime/bin/secure_socket.cc
@@ -126,16 +126,7 @@ void FUNCTION_NAME(SecureSocket_Connect)(Dart_NativeArguments args) {
ThrowIfError(Dart_StringToCString(host_name_object, &host_name));
RawAddr raw_addr;
- Dart_TypedData_Type type;
- uint8_t* buffer = NULL;
- intptr_t len;
- ThrowIfError(Dart_TypedDataAcquireData(host_sockaddr_storage_object,
- &type,
- reinterpret_cast<void**>(&buffer),
- &len));
- ASSERT(static_cast<size_t>(len) <= sizeof(raw_addr));
- memmove(&raw_addr, buffer, len);
- Dart_TypedDataReleaseData(host_sockaddr_storage_object);
+ SocketAddress::GetSockAddr(host_sockaddr_storage_object, &raw_addr);
int64_t port;
if (!DartUtils::GetInt64Value(port_object, &port)) {
« no previous file with comments | « runtime/bin/io_natives.cc ('k') | runtime/bin/socket.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698