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

Unified Diff: ppapi/proxy/websocket_resource.cc

Issue 915403003: Enable size_t to int truncation warnings in PPAPI (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ppapi_unittests win x64 Created 5 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/video_capture_resource.cc ('k') | ppapi/proxy/websocket_resource_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/websocket_resource.cc
diff --git a/ppapi/proxy/websocket_resource.cc b/ppapi/proxy/websocket_resource.cc
index d03121a870fda2d46e6e1b825053cf75ab894d18..bc4e8535520be3abbda67352ca3200df6984b38d 100644
--- a/ppapi/proxy/websocket_resource.cc
+++ b/ppapi/proxy/websocket_resource.cc
@@ -9,6 +9,7 @@
#include <vector>
#include "base/bind.h"
+#include "base/numerics/safe_conversions.h"
#include "ppapi/c/pp_errors.h"
#include "ppapi/proxy/dispatch_reply_message.h"
#include "ppapi/proxy/ppapi_messages.h"
@@ -424,7 +425,7 @@ void WebSocketResource::OnPluginMsgReceiveBinaryReply(
// Append received data to queue.
scoped_refptr<Var> message_var(
PpapiGlobals::Get()->GetVarTracker()->MakeArrayBufferVar(
- message.size(),
+ base::checked_cast<uint32_t>(message.size()),
&message.front()));
received_messages_.push(message_var);
« no previous file with comments | « ppapi/proxy/video_capture_resource.cc ('k') | ppapi/proxy/websocket_resource_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698