| Index: chrome/browser/renderer_host/browser_render_process_host.cc
|
| diff --git a/chrome/browser/renderer_host/browser_render_process_host.cc b/chrome/browser/renderer_host/browser_render_process_host.cc
|
| index 961b3adb47b3f8089713e453009940059920fd7a..7e7b2bc0fcef5066738b325da2372abb4f21232b 100644
|
| --- a/chrome/browser/renderer_host/browser_render_process_host.cc
|
| +++ b/chrome/browser/renderer_host/browser_render_process_host.cc
|
| @@ -959,16 +959,20 @@ void BrowserRenderProcessHost::OnChannelError() {
|
| if (!channel_.get())
|
| return;
|
|
|
| - // NULL in single process mode or if fast termination happened.
|
| - bool did_crash =
|
| - child_process_.get() ? child_process_->DidProcessCrash() : false;
|
| -
|
| - if (did_crash) {
|
| + // child_process_ can be NULL in single process mode or if fast
|
| + // termination happened.
|
| + int exit_code = 0;
|
| + base::TerminationStatus status =
|
| + child_process_.get() ?
|
| + child_process_->GetChildTerminationStatus(&exit_code) :
|
| + base::TERMINATION_STATUS_NORMAL_TERMINATION;
|
| +
|
| + if (status == base::TERMINATION_STATUS_PROCESS_CRASHED) {
|
| UMA_HISTOGRAM_PERCENTAGE("BrowserRenderProcessHost.ChildCrashes",
|
| extension_process_ ? 2 : 1);
|
| }
|
|
|
| - RendererClosedDetails details(did_crash, extension_process_);
|
| + RendererClosedDetails details(status, exit_code, extension_process_);
|
| NotificationService::current()->Notify(
|
| NotificationType::RENDERER_PROCESS_CLOSED,
|
| Source<RenderProcessHost>(this),
|
| @@ -981,7 +985,9 @@ void BrowserRenderProcessHost::OnChannelError() {
|
| IDMap<IPC::Channel::Listener>::iterator iter(&listeners_);
|
| while (!iter.IsAtEnd()) {
|
| iter.GetCurrentValue()->OnMessageReceived(
|
| - ViewHostMsg_RenderViewGone(iter.GetCurrentKey()));
|
| + ViewHostMsg_RenderViewGone(iter.GetCurrentKey(),
|
| + static_cast<int>(status),
|
| + exit_code));
|
| iter.Advance();
|
| }
|
|
|
|
|