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

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

Issue 2644843007: Always notify Mojo EDK of incomplete content child process launch (Closed)
Patch Set: Created 3 years, 11 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 | content/common/service_manager/child_connection.h » ('j') | 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/debug/dump_without_crashing.h" 10 #include "base/debug/dump_without_crashing.h"
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after
542 notify_child_disconnected_ = false; 542 notify_child_disconnected_ = false;
543 delete delegate_; // Will delete us 543 delete delegate_; // Will delete us
544 } 544 }
545 545
546 void BrowserChildProcessHostImpl::OnProcessLaunched() { 546 void BrowserChildProcessHostImpl::OnProcessLaunched() {
547 DCHECK_CURRENTLY_ON(BrowserThread::IO); 547 DCHECK_CURRENTLY_ON(BrowserThread::IO);
548 548
549 const base::Process& process = child_process_->GetProcess(); 549 const base::Process& process = child_process_->GetProcess();
550 DCHECK(process.IsValid()); 550 DCHECK(process.IsValid());
551 551
552 if (child_connection_)
553 child_connection_->SetProcessHandle(process.Handle());
554
552 #if defined(OS_WIN) 555 #if defined(OS_WIN)
553 // Start a WaitableEventWatcher that will invoke OnProcessExitedEarly if the 556 // Start a WaitableEventWatcher that will invoke OnProcessExitedEarly if the
554 // child process exits. This watcher is stopped once the IPC channel is 557 // child process exits. This watcher is stopped once the IPC channel is
555 // connected and the exit of the child process is detecter by an error on the 558 // connected and the exit of the child process is detecter by an error on the
556 // IPC channel thereafter. 559 // IPC channel thereafter.
557 DCHECK(!early_exit_watcher_.GetWatchedObject()); 560 DCHECK(!early_exit_watcher_.GetWatchedObject());
558 early_exit_watcher_.StartWatchingOnce(process.Handle(), this); 561 early_exit_watcher_.StartWatchingOnce(process.Handle(), this);
559 #endif 562 #endif
560 563
561 // TODO(rvargas) crbug.com/417532: Don't store a handle. 564 // TODO(rvargas) crbug.com/417532: Don't store a handle.
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
605 608
606 #if defined(OS_WIN) 609 #if defined(OS_WIN)
607 610
608 void BrowserChildProcessHostImpl::OnObjectSignaled(HANDLE object) { 611 void BrowserChildProcessHostImpl::OnObjectSignaled(HANDLE object) {
609 OnChildDisconnected(); 612 OnChildDisconnected();
610 } 613 }
611 614
612 #endif 615 #endif
613 616
614 } // namespace content 617 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/common/service_manager/child_connection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698