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

Unified Diff: ppapi/proxy/udp_socket_filter.cc

Issue 2727093003: Fix ASAN ODR violation in ppapi/proxy in component mode (Closed)
Patch Set: simplify, no export Created 3 years, 10 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 | « ppapi/proxy/tcp_socket_resource_constants.cc ('k') | ppapi/proxy/udp_socket_resource_constants.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/udp_socket_filter.cc
diff --git a/ppapi/proxy/udp_socket_filter.cc b/ppapi/proxy/udp_socket_filter.cc
index 85cab054613f90f4e343856c92ccbd2b87861a8e..119b4e49971f7ced9728df2b73bf8e64295cb1ad 100644
--- a/ppapi/proxy/udp_socket_filter.cc
+++ b/ppapi/proxy/udp_socket_filter.cc
@@ -153,7 +153,8 @@ void UDPSocketFilter::RecvQueue::DataReceivedOnIOThread(
const PP_NetAddress_Private& addr) {
DCHECK(PluginGlobals::Get()->ipc_task_runner()->RunsTasksOnCurrentThread());
DCHECK_LT(recv_buffers_.size(),
- UDPSocketResourceConstants::kPluginReceiveBufferSlots);
+ static_cast<size_t>(
+ UDPSocketResourceConstants::kPluginReceiveBufferSlots));
if (!TrackedCallback::IsPending(recvfrom_callback_) || !read_buffer_) {
recv_buffers_.push(RecvBuffer());
@@ -213,8 +214,9 @@ int32_t UDPSocketFilter::RecvQueue::RequestData(
if (recv_buffers_.empty()) {
read_buffer_ = buffer_out;
- bytes_to_read_ =
- std::min(num_bytes, UDPSocketResourceConstants::kMaxReadSize);
+ bytes_to_read_ = std::min(
+ num_bytes,
+ static_cast<int32_t>(UDPSocketResourceConstants::kMaxReadSize));
recvfrom_addr_resource_ = addr_out;
recvfrom_callback_ = callback;
return PP_OK_COMPLETIONPENDING;
« no previous file with comments | « ppapi/proxy/tcp_socket_resource_constants.cc ('k') | ppapi/proxy/udp_socket_resource_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698