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

Unified Diff: ppapi/proxy/flash_clipboard_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/file_ref_resource.cc ('k') | ppapi/proxy/pdf_resource.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/flash_clipboard_resource.cc
diff --git a/ppapi/proxy/flash_clipboard_resource.cc b/ppapi/proxy/flash_clipboard_resource.cc
index 2b665bfa0593ca85f706ab10e9ce10c04c2ce7db..28df94cddf89437c003fee3c24675493fdc96ae3 100644
--- a/ppapi/proxy/flash_clipboard_resource.cc
+++ b/ppapi/proxy/flash_clipboard_resource.cc
@@ -4,6 +4,7 @@
#include "ppapi/proxy/flash_clipboard_resource.h"
+#include "base/numerics/safe_conversions.h"
#include "ipc/ipc_message.h"
#include "ppapi/c/pp_errors.h"
#include "ppapi/proxy/ppapi_messages.h"
@@ -53,7 +54,7 @@ PP_Var ClipboardStringToPPVar(int32_t format,
} else {
// All other formats are expected to be array buffers.
return PpapiGlobals::Get()->GetVarTracker()->MakeArrayBufferPPVar(
- string.size(), string.data());
+ base::checked_cast<uint32_t>(string.size()), string.data());
}
}
} // namespace
« no previous file with comments | « ppapi/proxy/file_ref_resource.cc ('k') | ppapi/proxy/pdf_resource.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698