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

Side by Side Diff: content/browser/browser_child_process_host_impl.cc

Issue 658253002: Stop early exit watcher in BrowserChildProcessHostImpl::OnChildDisconnected (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/browser_child_process_host_impl.h" 5 #include "content/browser/browser_child_process_host_impl.h"
6 6
7 #include "base/base_switches.h" 7 #include "base/base_switches.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 } 263 }
264 base::KillProcess(GetHandle(), RESULT_CODE_KILLED_BAD_MESSAGE, false); 264 base::KillProcess(GetHandle(), RESULT_CODE_KILLED_BAD_MESSAGE, false);
265 } 265 }
266 266
267 bool BrowserChildProcessHostImpl::CanShutdown() { 267 bool BrowserChildProcessHostImpl::CanShutdown() {
268 return delegate_->CanShutdown(); 268 return delegate_->CanShutdown();
269 } 269 }
270 270
271 void BrowserChildProcessHostImpl::OnChildDisconnected() { 271 void BrowserChildProcessHostImpl::OnChildDisconnected() {
272 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 272 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
273 #if defined(OS_WIN)
274 DeleteProcessWaitableEvent(early_exit_watcher_.GetWatchedEvent());
275 early_exit_watcher_.StopWatching();
rvargas (doing something else) 2014/10/17 01:00:07 How does this work after https://codereview.chromi
276 #endif
273 if (child_process_.get() || data_.handle) { 277 if (child_process_.get() || data_.handle) {
274 DCHECK(data_.handle != base::kNullProcessHandle); 278 DCHECK(data_.handle != base::kNullProcessHandle);
275 int exit_code; 279 int exit_code;
276 base::TerminationStatus status = GetTerminationStatus( 280 base::TerminationStatus status = GetTerminationStatus(
277 true /* known_dead */, &exit_code); 281 true /* known_dead */, &exit_code);
278 switch (status) { 282 switch (status) {
279 case base::TERMINATION_STATUS_PROCESS_CRASHED: 283 case base::TERMINATION_STATUS_PROCESS_CRASHED:
280 case base::TERMINATION_STATUS_ABNORMAL_TERMINATION: { 284 case base::TERMINATION_STATUS_ABNORMAL_TERMINATION: {
281 delegate_->OnProcessCrashed(exit_code); 285 delegate_->OnProcessCrashed(exit_code);
282 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, 286 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 363
360 void BrowserChildProcessHostImpl::OnProcessExitedEarly( 364 void BrowserChildProcessHostImpl::OnProcessExitedEarly(
361 base::WaitableEvent* event) { 365 base::WaitableEvent* event) {
362 DeleteProcessWaitableEvent(event); 366 DeleteProcessWaitableEvent(event);
363 OnChildDisconnected(); 367 OnChildDisconnected();
364 } 368 }
365 369
366 #endif 370 #endif
367 371
368 } // namespace content 372 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698