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

Unified Diff: util/win/exception_handler_server.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 | « util/util_test.gyp ('k') | util/win/handle.h » ('j') | util/win/handle.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: util/win/exception_handler_server.cc
diff --git a/util/win/exception_handler_server.cc b/util/win/exception_handler_server.cc
index 2035c57857cd0e98428d0f2a029e71fa0801e92c..ce5687d74b7ba6f853708f68acf5e4f25390f5b0 100644
--- a/util/win/exception_handler_server.cc
+++ b/util/win/exception_handler_server.cc
@@ -28,6 +28,7 @@
#include "util/misc/tri_state.h"
#include "util/misc/uuid.h"
#include "util/win/get_function.h"
+#include "util/win/handle.h"
#include "util/win/registration_protocol_win.h"
#include "util/win/xp_compat.h"
@@ -489,14 +490,14 @@ bool ExceptionHandlerServer::ServiceClientConnection(
// Duplicate the events back to the client so they can request a dump.
ServerToClientMessage response;
response.registration.request_crash_dump_event =
- base::checked_cast<uint32_t>(reinterpret_cast<uintptr_t>(DuplicateEvent(
- client->process(), client->crash_dump_requested_event())));
+ HandleToInt(DuplicateEvent(
+ client->process(), client->crash_dump_requested_event()));
response.registration.request_non_crash_dump_event =
- base::checked_cast<uint32_t>(reinterpret_cast<uintptr_t>(DuplicateEvent(
- client->process(), client->non_crash_dump_requested_event())));
+ HandleToInt(DuplicateEvent(
+ client->process(), client->non_crash_dump_requested_event()));
response.registration.non_crash_dump_completed_event =
- base::checked_cast<uint32_t>(reinterpret_cast<uintptr_t>(DuplicateEvent(
- client->process(), client->non_crash_dump_completed_event())));
+ HandleToInt(DuplicateEvent(
+ client->process(), client->non_crash_dump_completed_event()));
if (!LoggingWriteFile(service_context.pipe(), &response, sizeof(response)))
return false;
« no previous file with comments | « util/util_test.gyp ('k') | util/win/handle.h » ('j') | util/win/handle.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698