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

Unified Diff: runtime/bin/socket_win.cc

Issue 2439173002: [windows] Make most file_win.cc functions use malloc for string conversions. (Closed)
Patch Set: Fix typo Created 4 years, 2 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/file_win.cc ('k') | runtime/bin/utils_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/socket_win.cc
diff --git a/runtime/bin/socket_win.cc b/runtime/bin/socket_win.cc
index f76f764c7c4835789c8fda0024d216c3b34778b7..1dce52e9d974554fe9ad00e1a6e89bbb8aac37c6 100644
--- a/runtime/bin/socket_win.cc
+++ b/runtime/bin/socket_win.cc
@@ -370,12 +370,12 @@ bool Socket::ReverseLookup(const RawAddr& addr,
bool Socket::ParseAddress(int type, const char* address, RawAddr* addr) {
int result;
- const wchar_t* system_address = StringUtilsWin::Utf8ToWide(address);
+ Utf8ToWideScope system_address(address);
if (type == SocketAddress::TYPE_IPV4) {
- result = InetPton(AF_INET, system_address, &addr->in.sin_addr);
+ result = InetPton(AF_INET, system_address.wide(), &addr->in.sin_addr);
} else {
ASSERT(type == SocketAddress::TYPE_IPV6);
- result = InetPton(AF_INET6, system_address, &addr->in6.sin6_addr);
+ result = InetPton(AF_INET6, system_address.wide(), &addr->in6.sin6_addr);
}
return result == 1;
}
« no previous file with comments | « runtime/bin/file_win.cc ('k') | runtime/bin/utils_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698