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

Unified Diff: content/public/common/common_param_traits.h

Issue 1422773008: Fixing remaining VC++ 2015 64-bit build breaks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync to latest Created 5 years, 1 month 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/public/common/common_param_traits.h
diff --git a/content/public/common/common_param_traits.h b/content/public/common/common_param_traits.h
index 69fb84a5fb6c8539656293ca6ce004c12e9ed3a8..fcdd081d2fc39fa9a4b97ff5bf970475c00cbce8 100644
--- a/content/public/common/common_param_traits.h
+++ b/content/public/common/common_param_traits.h
@@ -82,7 +82,8 @@ struct ParamTraits<gfx::NativeWindow> {
static void Write(Message* m, const param_type& p) {
#if defined(OS_WIN)
// HWNDs are always 32 bits on Windows, even on 64 bit systems.
- m->WriteUInt32(reinterpret_cast<uint32>(p));
+ // Cast through uintptr_t and then uint32 to make the truncation explicit.
+ m->WriteUInt32(static_cast<uint32>(reinterpret_cast<uintptr_t>(p)));
#else
m->WriteData(reinterpret_cast<const char*>(&p), sizeof(p));
#endif

Powered by Google App Engine
This is Rietveld 408576698