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

Unified Diff: ppapi/proxy/ppb_graphics_3d_proxy.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/ppapi_command_buffer_proxy.cc ('k') | ppapi/proxy/ppb_instance_proxy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/ppb_graphics_3d_proxy.cc
diff --git a/ppapi/proxy/ppb_graphics_3d_proxy.cc b/ppapi/proxy/ppb_graphics_3d_proxy.cc
index 7cd2b88bcdb27155f68e2921bd21f7a9b4a5bf68..6b49914c2724d2a10c97fa0aec5a37d326138e7b 100644
--- a/ppapi/proxy/ppb_graphics_3d_proxy.cc
+++ b/ppapi/proxy/ppb_graphics_3d_proxy.cc
@@ -4,6 +4,7 @@
#include "ppapi/proxy/ppb_graphics_3d_proxy.h"
+#include "base/numerics/safe_conversions.h"
#include "gpu/command_buffer/client/gles2_implementation.h"
#include "gpu/command_buffer/common/command_buffer.h"
#include "ppapi/c/pp_errors.h"
@@ -315,7 +316,7 @@ void PPB_Graphics3D_Proxy::OnMsgCreateTransferBuffer(
DCHECK(backing && backing->shared_memory());
transfer_buffer->set_shmem(
TransportSHMHandle(dispatcher(), backing->shared_memory()->handle()),
- buffer->size());
+ base::checked_cast<uint32_t>(buffer->size()));
} else {
*id = -1;
}
« no previous file with comments | « ppapi/proxy/ppapi_command_buffer_proxy.cc ('k') | ppapi/proxy/ppb_instance_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698