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

Unified Diff: client/crashpad_client_win.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 | « no previous file | handler/main.cc » ('j') | util/win/handle.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/crashpad_client_win.cc
diff --git a/client/crashpad_client_win.cc b/client/crashpad_client_win.cc
index a2506cb742f7675a83f83b0f47f14c1a2e81bf22..46b613726b8b1a9ac49606b94d5dc509de04ee5a 100644
--- a/client/crashpad_client_win.cc
+++ b/client/crashpad_client_win.cc
@@ -26,6 +26,7 @@
#include "util/file/file_io.h"
#include "util/win/command_line.h"
#include "util/win/critical_section_with_debug_info.h"
+#include "util/win/handle.h"
#include "util/win/registration_protocol_win.h"
#include "util/win/scoped_handle.h"
@@ -166,13 +167,9 @@ bool CrashpadClient::StartHandler(
base::UTF8ToUTF16(kv.first + '=' + kv.second)),
&command_line);
}
-
- // According to
- // https://msdn.microsoft.com/en-us/library/windows/desktop/aa384203, HANDLEs
- // are always 32 bits.
AppendCommandLineArgument(
base::UTF8ToUTF16(base::StringPrintf("--handshake-handle=0x%x",
- pipe_write)),
+ HandleToInt(pipe_write))),
&command_line);
STARTUPINFO startup_info = {};
@@ -271,12 +268,12 @@ bool CrashpadClient::UseHandler() {
}
// The server returns these already duplicated to be valid in this process.
- g_signal_exception = reinterpret_cast<HANDLE>(
- static_cast<uintptr_t>(response.registration.request_crash_dump_event));
- g_signal_non_crash_dump = reinterpret_cast<HANDLE>(static_cast<uintptr_t>(
- response.registration.request_non_crash_dump_event));
- g_non_crash_dump_done = reinterpret_cast<HANDLE>(static_cast<uintptr_t>(
- response.registration.non_crash_dump_completed_event));
+ g_signal_exception =
+ IntToHandle(response.registration.request_crash_dump_event);
+ g_signal_non_crash_dump =
+ IntToHandle(response.registration.request_non_crash_dump_event);
+ g_non_crash_dump_done =
+ IntToHandle(response.registration.non_crash_dump_completed_event);
g_non_crash_dump_lock = new base::Lock();
« no previous file with comments | « no previous file | handler/main.cc » ('j') | util/win/handle.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698