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

Unified Diff: content/browser/renderer_host/render_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 side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/render_process_host_impl.cc
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index 1b610a259edac5a9f2708f3ca05886726453ce95..72ec4959ad8227e426b5db1ac85dfacc7f618790 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -894,7 +894,7 @@ bool RenderProcessHostImpl::FastShutdownIfPossible() {
if (!SuddenTerminationAllowed())
return false;
- ProcessDied();
+ ProcessDied(false /* already_dead */);
fast_shutdown_started_ = true;
return true;
}
@@ -1075,7 +1075,7 @@ void RenderProcessHostImpl::OnChannelConnected(int32 peer_pid) {
}
void RenderProcessHostImpl::OnChannelError() {
- ProcessDied();
+ ProcessDied(true /* already_dead */);
}
BrowserContext* RenderProcessHostImpl::GetBrowserContext() const {
@@ -1418,7 +1418,7 @@ void RenderProcessHostImpl::RegisterProcessHostForSite(
map->RegisterProcess(site, process);
}
-void RenderProcessHostImpl::ProcessDied() {
+void RenderProcessHostImpl::ProcessDied(bool already_dead) {
// Our child process has died. If we didn't expect it, it's a crash.
// In any case, we need to let everyone know it's gone.
// The OnChannelError notification can fire multiple times due to nested sync
@@ -1430,7 +1430,8 @@ void RenderProcessHostImpl::ProcessDied() {
int exit_code = 0;
base::TerminationStatus status =
child_process_launcher_.get() ?
- child_process_launcher_->GetChildTerminationStatus(&exit_code) :
+ child_process_launcher_->GetChildTerminationStatus(already_dead,
+ &exit_code) :
base::TERMINATION_STATUS_NORMAL_TERMINATION;
RendererClosedDetails details(GetHandle(), status, exit_code);
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.h ('k') | content/browser/zygote_host/zygote_host_impl_linux.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698