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

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

Issue 614813002: Cleanup sandbox/ in advance of re-enabling some MSVC warnings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comments Created 6 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 | « sandbox/win/src/service_resolver_64.cc ('k') | sandbox/win/tests/validation_tests/commands.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/win/src/target_process.cc
diff --git a/sandbox/win/src/target_process.cc b/sandbox/win/src/target_process.cc
index fea52b2a6885459b29e6fa671d32ba5705a331ea..2c5bf3b1f9736975baa9cadf3a558c01873a9c3a 100644
--- a/sandbox/win/src/target_process.cc
+++ b/sandbox/win/src/target_process.cc
@@ -88,14 +88,16 @@ TargetProcess::~TargetProcess() {
// from showing up in purify.
if (sandbox_process_info_.IsValid()) {
::WaitForSingleObject(sandbox_process_info_.process_handle(), 50);
+ // At this point, the target process should have been killed. Check.
if (!::GetExitCodeProcess(sandbox_process_info_.process_handle(),
&exit_code) || (STILL_ACTIVE == exit_code)) {
- // It is an error to destroy this object while the target process is still
- // alive because we need to destroy the IPC subsystem and cannot risk to
- // have an IPC reach us after this point.
+ // Something went wrong. We don't know if the target is in a state where
+ // it can manage to do another IPC call. If it can, and we've destroyed
+ // the |ipc_server_|, it will crash the broker. So we intentionally leak
+ // that.
if (shared_section_.IsValid())
shared_section_.Take();
- SharedMemIPCServer* server = ipc_server_.release();
+ ipc_server_.release();
sandbox_process_info_.TakeProcessHandle();
return;
}
« no previous file with comments | « sandbox/win/src/service_resolver_64.cc ('k') | sandbox/win/tests/validation_tests/commands.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698