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

Unified Diff: sandbox/win/src/handle_inheritance_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/handle_inheritance_test.cc
diff --git a/sandbox/win/src/handle_inheritance_test.cc b/sandbox/win/src/handle_inheritance_test.cc
index 1a411b543b41388c7b5698b968f0583bf72b3322..4fb98f1c8bb07aac490d7f25bbf945302c1f8cd8 100644
--- a/sandbox/win/src/handle_inheritance_test.cc
+++ b/sandbox/win/src/handle_inheritance_test.cc
@@ -82,9 +82,12 @@ TEST(HandleInheritanceTests, InheritByValue) {
void* shared_handle = runner.GetPolicy()->AddHandleToShare(
test_shared_memory.handle().GetHandle());
- std::string command_line =
- "HandleInheritanceTests_ValidInheritedHandle " +
- base::UintToString(reinterpret_cast<unsigned int>(shared_handle));
+ std::string command_line = "HandleInheritanceTests_ValidInheritedHandle " +
+ // Cast through uintptr_t and then unsigned int to
+ // make the truncation explicit. Handles are size
+ // of-pointer but are always 32-bit values.
+ base::UintToString(static_cast<unsigned int>(
+ reinterpret_cast<uintptr_t>(shared_handle)));
int result = runner.RunTest(base::UTF8ToUTF16(command_line).c_str());
ASSERT_EQ(SBOX_TEST_SUCCEEDED, result);
}

Powered by Google App Engine
This is Rietveld 408576698