summaryrefslogtreecommitdiffstats
path: root/sandbox/src/broker_services.cc
diff options
context:
space:
mode:
authorcpu@google.com <cpu@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-01 01:27:43 +0000
committercpu@google.com <cpu@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-01 01:27:43 +0000
commitcb7fa5563e0b469b582251103b716df534baecdf (patch)
treefe7669399904f7a9d28545273e84c7bd7c8d239d /sandbox/src/broker_services.cc
parent19327b4cdb21cedeb6fe2f7f59779d097134b926 (diff)
downloadchromium_src-cb7fa5563e0b469b582251103b716df534baecdf.zip
chromium_src-cb7fa5563e0b469b582251103b716df534baecdf.tar.gz
chromium_src-cb7fa5563e0b469b582251103b716df534baecdf.tar.bz2
-Fix a wrong comment
-Put a comment to clarify a behavior See coverity CID 1703 BUG=none TEST=none Review URL: http://codereview.chromium.org/150128 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19700 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sandbox/src/broker_services.cc')
-rw-r--r--sandbox/src/broker_services.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/sandbox/src/broker_services.cc b/sandbox/src/broker_services.cc
index 557c82d..2c53a42 100644
--- a/sandbox/src/broker_services.cc
+++ b/sandbox/src/broker_services.cc
@@ -119,8 +119,11 @@ void BrokerServicesBase::FreeResources(JobTracker* tracker) {
if (NULL != tracker->policy) {
BOOL res = ::TerminateJobObject(tracker->job, SBOX_ALL_OK);
DCHECK(res);
+ // Closing the job causes the target process to be destroyed so this
+ // needs to happen before calling OnJobEmpty().
res = ::CloseHandle(tracker->job);
DCHECK(res);
+ // In OnJobEmpty() we don't actually use the job handle directly.
tracker->policy->OnJobEmpty(tracker->job);
tracker->policy->Release();
tracker->policy = NULL;