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

Unified Diff: util/win/exception_handler_server.cc

Issue 1357833002: win: Get Crashpad compiling under VS2015 (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: include Created 5 years, 3 months 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 | « test/win/win_child_process.cc ('k') | util/win/module_version.cc » ('j') | no next file with comments »
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 50a5fa3c509021cb4fe28eb6bf875e34bd243e83..bcdec6a21d43b10ed14b077bc0b6f2d69ebb5038 100644
--- a/util/win/exception_handler_server.cc
+++ b/util/win/exception_handler_server.cc
@@ -17,6 +17,7 @@
#include <string.h>
#include "base/logging.h"
+#include "base/numerics/safe_conversions.h"
#include "base/rand_util.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
@@ -351,7 +352,7 @@ bool ExceptionHandlerServer::ServiceClientConnection(
PLOG(ERROR) << "ImpersonateNamedPipeClient";
return false;
}
- HANDLE client_process = OpenProcess(
+ client_process = OpenProcess(
kXPProcessAllAccess, false, message.registration.client_process_id);
PCHECK(RevertToSelf());
if (!client_process) {
@@ -375,8 +376,9 @@ bool ExceptionHandlerServer::ServiceClientConnection(
// Duplicate the events back to the client so they can request a dump.
ServerToClientMessage response;
- response.registration.request_report_event = reinterpret_cast<uint32_t>(
- DuplicateEvent(client->process(), client->dump_requested_event()));
+ response.registration.request_report_event =
+ base::checked_cast<uint32_t>(reinterpret_cast<uintptr_t>(
+ DuplicateEvent(client->process(), client->dump_requested_event())));
if (!LoggingWriteFile(service_context.pipe(), &response, sizeof(response)))
return false;
« no previous file with comments | « test/win/win_child_process.cc ('k') | util/win/module_version.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698