Commit 319402ee authored by jbauman's avatar jbauman Committed by Commit bot

Stop early exit watcher in BrowserChildProcessHostImpl::OnChildDisconnected

The early exit watcher holds on to a reference to the waitable event which ChildProcessLauncher::GetChildTerminationStatus deletes, so it should be stopped first.

BUG=424024

Review URL: https://codereview.chromium.org/658253002

Cr-Commit-Position: refs/heads/master@{#300518}
parent 0ec2d447
......@@ -265,6 +265,11 @@ bool BrowserChildProcessHostImpl::CanShutdown() {
void BrowserChildProcessHostImpl::OnChildDisconnected() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
#if defined(OS_WIN)
// OnChildDisconnected may be called without OnChannelConnected, so stop the
// early exit watcher so GetTerminationStatus can close the process handle.
early_exit_watcher_.StopWatching();
#endif
if (child_process_.get() || data_.handle) {
DCHECK(data_.handle != base::kNullProcessHandle);
int exit_code;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment