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

Unified Diff: sandbox/win/src/broker_services.cc

Issue 1119783002: vs2015: fix narrowing warnings in sandbox/win/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2015-printing-emf
Patch Set: Created 5 years, 8 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 | « no previous file | sandbox/win/src/eat_resolver.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/win/src/broker_services.cc
diff --git a/sandbox/win/src/broker_services.cc b/sandbox/win/src/broker_services.cc
index 01c7cdd63b49f2894258e0c32bf8c70dec99809d..149218fa28eacd9366d9c2f471330191ce739b28 100644
--- a/sandbox/win/src/broker_services.cc
+++ b/sandbox/win/src/broker_services.cc
@@ -279,7 +279,8 @@ DWORD WINAPI BrokerServicesBase::TargetEventsThread(PVOID param) {
case JOB_OBJECT_MSG_ABNORMAL_EXIT_PROCESS: {
{
AutoLock lock(&broker->lock_);
- broker->child_process_ids_.erase(reinterpret_cast<DWORD>(ovl));
+ broker->child_process_ids_.erase(
+ static_cast<DWORD>(reinterpret_cast<uintptr_t>(ovl)));
}
--target_counter;
if (0 == target_counter)
@@ -308,8 +309,8 @@ DWORD WINAPI BrokerServicesBase::TargetEventsThread(PVOID param) {
} else if (THREAD_CTRL_REMOVE_PEER == key) {
// Remove a process from our list of peers.
AutoLock lock(&broker->lock_);
- PeerTrackerMap::iterator it =
- broker->peer_map_.find(reinterpret_cast<DWORD>(ovl));
+ PeerTrackerMap::iterator it = broker->peer_map_.find(
+ static_cast<DWORD>(reinterpret_cast<uintptr_t>(ovl)));
DeregisterPeerTracker(it->second);
broker->peer_map_.erase(it);
} else if (THREAD_CTRL_QUIT == key) {
@@ -542,8 +543,9 @@ bool BrokerServicesBase::IsActiveTarget(DWORD process_id) {
VOID CALLBACK BrokerServicesBase::RemovePeer(PVOID parameter, BOOLEAN timeout) {
PeerTracker* peer = reinterpret_cast<PeerTracker*>(parameter);
// Don't check the return code because we this may fail (safely) at shutdown.
- ::PostQueuedCompletionStatus(peer->job_port, 0, THREAD_CTRL_REMOVE_PEER,
- reinterpret_cast<LPOVERLAPPED>(peer->id));
+ ::PostQueuedCompletionStatus(
+ peer->job_port, 0, THREAD_CTRL_REMOVE_PEER,
+ reinterpret_cast<LPOVERLAPPED>(static_cast<uintptr_t>(peer->id)));
}
ResultCode BrokerServicesBase::AddTargetPeer(HANDLE peer_process) {
« no previous file with comments | « no previous file | sandbox/win/src/eat_resolver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698