Index: content/browser/browser_child_process_host_impl.cc |
diff --git a/content/browser/browser_child_process_host_impl.cc b/content/browser/browser_child_process_host_impl.cc |
index f2f28278c2199ee5eba6fc4eb65b6b2426d7a5ff..7c47194447538aa31e069774ce582b15fb24bf62 100644 |
--- a/content/browser/browser_child_process_host_impl.cc |
+++ b/content/browser/browser_child_process_host_impl.cc |
@@ -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; |