diff options
author | kkania@chromium.org <kkania@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-04 20:23:36 +0000 |
---|---|---|
committer | kkania@chromium.org <kkania@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-04 20:23:36 +0000 |
commit | 3131a4bc3ef3b6f545b7dea6ea55d8419099b7b2 (patch) | |
tree | fef3b85252836c1afe7c354ba9a6e5766d8402ac /chrome/browser/metrics | |
parent | fcc2caa7b147a296f450df1d3bbcd2bc4569093e (diff) | |
download | chromium_src-3131a4bc3ef3b6f545b7dea6ea55d8419099b7b2.zip chromium_src-3131a4bc3ef3b6f545b7dea6ea55d8419099b7b2.tar.gz chromium_src-3131a4bc3ef3b6f545b7dea6ea55d8419099b7b2.tar.bz2 |
Fix race in zygote_host_linux where socket was being read from and written to on different threads.
Made ZygoteHost methods all run on PROCESS_LAUNCHER thread. PostTask in linux from UI thread to PROCESS_LAUNCHER thread for DidProcessCrash. Changed DidProcessCrash to answer via a callback, which occurs asynchronously on linux. Rework cases in nacl_host, browser_render_process_host, and child_process_host where this method was being called to fit the callback model.
BUG=31737
TEST=none
Review URL: http://codereview.chromium.org/1695026
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46384 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/metrics')
-rw-r--r-- | chrome/browser/metrics/metrics_service.cc | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/chrome/browser/metrics/metrics_service.cc b/chrome/browser/metrics/metrics_service.cc index ad24a11..38833a0 100644 --- a/chrome/browser/metrics/metrics_service.cc +++ b/chrome/browser/metrics/metrics_service.cc @@ -481,7 +481,7 @@ void MetricsService::SetRecording(bool enabled) { NotificationService::AllSources()); registrar_.Add(this, NotificationType::LOAD_STOP, NotificationService::AllSources()); - registrar_.Add(this, NotificationType::RENDERER_PROCESS_CLOSED, + registrar_.Add(this, NotificationType::RENDERER_PROCESS_CRASHED, NotificationService::AllSources()); registrar_.Add(this, NotificationType::RENDERER_PROCESS_HANG, NotificationService::AllSources()); @@ -557,17 +557,13 @@ void MetricsService::Observe(NotificationType type, LogLoadStarted(); break; - case NotificationType::RENDERER_PROCESS_CLOSED: + case NotificationType::RENDERER_PROCESS_CRASHED: { - RenderProcessHost::RendererClosedDetails* process_details = - Details<RenderProcessHost::RendererClosedDetails>(details).ptr(); - if (process_details->did_crash) { - if (process_details->was_extension_renderer) { - LogExtensionRendererCrash(); - } else { - LogRendererCrash(); - } - } + // The details are whether it is an extension process. + if (*Details<bool>(details).ptr()) + LogExtensionRendererCrash(); + else + LogRendererCrash(); } break; |