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

Unified Diff: sandbox/win/src/policy_target_test.cc

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: sandbox/win/src/policy_target_test.cc
diff --git a/sandbox/win/src/policy_target_test.cc b/sandbox/win/src/policy_target_test.cc
index bb1f0b2ba38fd2fb94c780c26715a42c74975e2d..e286073d743b0675b7636ea8c5d0e42e1dc74622 100644
--- a/sandbox/win/src/policy_target_test.cc
+++ b/sandbox/win/src/policy_target_test.cc
@@ -382,8 +382,10 @@ TEST(PolicyTargetTest, ShareHandleTest) {
base::string16 arguments(L"\"");
arguments += prog_name;
arguments += L"\" -child 0 shared_memory_handle ";
+ // Cast through uintptr_t and then unsigned int to make the truncation
+ // explicit. Handles are size-of-pointer but are always 32-bit values.
arguments += base::UintToString16(
- reinterpret_cast<unsigned int>(shared_handle));
+ static_cast<unsigned int>(reinterpret_cast<uintptr_t>(shared_handle)));
// Launch the app.
ResultCode result = SBOX_ALL_OK;

Powered by Google App Engine
This is Rietveld 408576698