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

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

Issue 11316261: Linux: inform the Zygote when it's waiting on a dead process (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address Adam's remarks. Created 8 years 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 | Annotate | Revision Log
« no previous file with comments | « base/process_util_posix.cc ('k') | content/browser/child_process_launcher.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/file_path.h" 10 #include "base/file_path.h"
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 BrowserThread::UI, 187 BrowserThread::UI,
188 FROM_HERE, 188 FROM_HERE,
189 base::Bind(&ChildNotificationHelper, type, data_)); 189 base::Bind(&ChildNotificationHelper, type, data_));
190 } 190 }
191 191
192 base::TerminationStatus BrowserChildProcessHostImpl::GetTerminationStatus( 192 base::TerminationStatus BrowserChildProcessHostImpl::GetTerminationStatus(
193 int* exit_code) { 193 int* exit_code) {
194 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 194 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
195 if (!child_process_.get()) // If the delegate doesn't use Launch() helper. 195 if (!child_process_.get()) // If the delegate doesn't use Launch() helper.
196 return base::GetTerminationStatus(data_.handle, exit_code); 196 return base::GetTerminationStatus(data_.handle, exit_code);
197 return child_process_->GetChildTerminationStatus(exit_code); 197 return child_process_->GetChildTerminationStatus(false /* known_dead */,
198 exit_code);
198 } 199 }
199 200
200 bool BrowserChildProcessHostImpl::OnMessageReceived( 201 bool BrowserChildProcessHostImpl::OnMessageReceived(
201 const IPC::Message& message) { 202 const IPC::Message& message) {
202 return delegate_->OnMessageReceived(message); 203 return delegate_->OnMessageReceived(message);
203 } 204 }
204 205
205 void BrowserChildProcessHostImpl::OnChannelConnected(int32 peer_pid) { 206 void BrowserChildProcessHostImpl::OnChannelConnected(int32 peer_pid) {
206 Notify(NOTIFICATION_CHILD_PROCESS_HOST_CONNECTED); 207 Notify(NOTIFICATION_CHILD_PROCESS_HOST_CONNECTED);
207 delegate_->OnChannelConnected(peer_pid); 208 delegate_->OnChannelConnected(peer_pid);
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 void BrowserChildProcessHostImpl::OnProcessLaunched() { 262 void BrowserChildProcessHostImpl::OnProcessLaunched() {
262 if (!child_process_->GetHandle()) { 263 if (!child_process_->GetHandle()) {
263 delete delegate_; // Will delete us 264 delete delegate_; // Will delete us
264 return; 265 return;
265 } 266 }
266 data_.handle = child_process_->GetHandle(); 267 data_.handle = child_process_->GetHandle();
267 delegate_->OnProcessLaunched(); 268 delegate_->OnProcessLaunched();
268 } 269 }
269 270
270 } // namespace content 271 } // namespace content
OLDNEW
« no previous file with comments | « base/process_util_posix.cc ('k') | content/browser/child_process_launcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698