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

Unified Diff: test/win/win_child_process.cc

Issue 1422503015: win: Add HandleToInt() and IntToHandle() (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: 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
« no previous file with comments | « handler/main.cc ('k') | util/util.gyp » ('j') | util/win/handle.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/win/win_child_process.cc
diff --git a/test/win/win_child_process.cc b/test/win/win_child_process.cc
index 577b6b6356196878c095a7d3c92bc366fd75a183..7d179337277ecbf06cde175145fe66ff942d1674 100644
--- a/test/win/win_child_process.cc
+++ b/test/win/win_child_process.cc
@@ -25,6 +25,7 @@
#include "gtest/gtest.h"
#include "util/stdlib/string_number_conversion.h"
#include "util/string/split_string.h"
+#include "util/win/handle.h"
#include "test/paths.h"
namespace crashpad {
@@ -152,8 +153,8 @@ WinChildProcess::WinChildProcess() {
unsigned int write, read;
CHECK(StringToNumber(left, &write));
CHECK(StringToNumber(right, &read));
- pipe_write_.reset(reinterpret_cast<HANDLE>(static_cast<uintptr_t>(write)));
- pipe_read_.reset(reinterpret_cast<HANDLE>(static_cast<uintptr_t>(read)));
+ pipe_write_.reset(IntToHandle(write));
+ pipe_read_.reset(IntToHandle(read));
// Notify the parent that it's OK to proceed. We only need to wait to get to
// the process entry point, but this is the easiest place we can notify.
@@ -193,8 +194,8 @@ scoped_ptr<WinChildProcess::Handles> WinChildProcess::Launch() {
test_info->test_case_name(),
test_info->name(),
kIsMultiprocessChild,
- write_for_child,
- read_for_child.get()));
+ HandleToInt(write_for_child.get()),
+ HandleToInt(read_for_child.get())));
// Command-line buffer cannot be constant, per CreateProcess signature.
handles_for_parent->process = LaunchCommandLine(&command_line[0]);
« no previous file with comments | « handler/main.cc ('k') | util/util.gyp » ('j') | util/win/handle.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698