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

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

Issue 2645713004: 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 532 matching lines...) Expand 10 before | Expand all | Expand 10 after
543 notify_child_disconnected_ = false; 543 notify_child_disconnected_ = false;
544 delete delegate_; // Will delete us 544 delete delegate_; // Will delete us
545 } 545 }
546 546
547 void BrowserChildProcessHostImpl::OnProcessLaunched() { 547 void BrowserChildProcessHostImpl::OnProcessLaunched() {
548 DCHECK_CURRENTLY_ON(BrowserThread::IO); 548 DCHECK_CURRENTLY_ON(BrowserThread::IO);
549 549
550 const base::Process& process = child_process_->GetProcess(); 550 const base::Process& process = child_process_->GetProcess();
551 DCHECK(process.IsValid()); 551 DCHECK(process.IsValid());
552 552
553 if (child_connection_)
554 child_connection_->SetProcessHandle(process.Handle());
555
553 #if defined(OS_WIN) 556 #if defined(OS_WIN)
554 // Start a WaitableEventWatcher that will invoke OnProcessExitedEarly if the 557 // Start a WaitableEventWatcher that will invoke OnProcessExitedEarly if the
555 // child process exits. This watcher is stopped once the IPC channel is 558 // child process exits. This watcher is stopped once the IPC channel is
556 // connected and the exit of the child process is detecter by an error on the 559 // connected and the exit of the child process is detecter by an error on the
557 // IPC channel thereafter. 560 // IPC channel thereafter.
558 DCHECK(!early_exit_watcher_.GetWatchedObject()); 561 DCHECK(!early_exit_watcher_.GetWatchedObject());
559 early_exit_watcher_.StartWatchingOnce(process.Handle(), this); 562 early_exit_watcher_.StartWatchingOnce(process.Handle(), this);
560 #endif 563 #endif
561 564
562 // TODO(rvargas) crbug.com/417532: Don't store a handle. 565 // TODO(rvargas) crbug.com/417532: Don't store a handle.
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
607 610
608 #if defined(OS_WIN) 611 #if defined(OS_WIN)
609 612
610 void BrowserChildProcessHostImpl::OnObjectSignaled(HANDLE object) { 613 void BrowserChildProcessHostImpl::OnObjectSignaled(HANDLE object) {
611 OnChildDisconnected(); 614 OnChildDisconnected();
612 } 615 }
613 616
614 #endif 617 #endif
615 618
616 } // namespace content 619 } // 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