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

Unified Diff: content/browser/renderer_host/pepper/pepper_socket_utils.cc

Issue 2881673002: Avoid heap allocations in IPAddress (Closed)
Patch Set: New constructor Created 3 years, 7 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
Index: content/browser/renderer_host/pepper/pepper_socket_utils.cc
diff --git a/content/browser/renderer_host/pepper/pepper_socket_utils.cc b/content/browser/renderer_host/pepper/pepper_socket_utils.cc
index b749682afaa6af264ea13ebbd203ff2ec9f34903..b766a7f5c513a6c5c559af41166944fc093841d3 100644
--- a/content/browser/renderer_host/pepper/pepper_socket_utils.cc
+++ b/content/browser/renderer_host/pepper/pepper_socket_utils.cc
@@ -38,7 +38,7 @@ SocketPermissionRequest CreateSocketPermissionRequest(
std::string host =
ppapi::NetAddressPrivateImpl::DescribeNetAddress(net_addr, false);
uint16_t port = 0;
- std::vector<unsigned char> address;
+ net::IPAddressBytes address;
ppapi::NetAddressPrivateImpl::NetAddressToIPEndPoint(
net_addr, &address, &port);
return SocketPermissionRequest(type, host, port);

Powered by Google App Engine
This is Rietveld 408576698