diff options
author | cpu@google.com <cpu@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-01 01:27:43 +0000 |
---|---|---|
committer | cpu@google.com <cpu@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-01 01:27:43 +0000 |
commit | cb7fa5563e0b469b582251103b716df534baecdf (patch) | |
tree | fe7669399904f7a9d28545273e84c7bd7c8d239d /sandbox | |
parent | 19327b4cdb21cedeb6fe2f7f59779d097134b926 (diff) | |
download | chromium_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')
-rw-r--r-- | sandbox/src/broker_services.cc | 3 | ||||
-rw-r--r-- | sandbox/src/target_process.h | 2 |
2 files changed, 4 insertions, 1 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; diff --git a/sandbox/src/target_process.h b/sandbox/src/target_process.h index aeb14d6..a3a8d3b 100644 --- a/sandbox/src/target_process.h +++ b/sandbox/src/target_process.h @@ -22,7 +22,7 @@ class ThreadProvider; // class are owned by the Policy used to create them. class TargetProcess { public: - // The constructor takes ownership of all the three handles given to it. + // The constructor takes ownership of |initial_token| and |lockdown_token|. TargetProcess(HANDLE initial_token, HANDLE lockdown_token, HANDLE job, ThreadProvider* thread_pool); ~TargetProcess(); |