diff options
author | cpu@chromium.org <cpu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-16 02:12:01 +0000 |
---|---|---|
committer | cpu@chromium.org <cpu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-16 02:12:01 +0000 |
commit | 0e1fbd2c6e0dcfdcde749a210b0ef3e9cf78acd8 (patch) | |
tree | bb6ee136e060f185ed84385da79f60c6010ba822 /content/browser/browser_child_process_host.h | |
parent | 8718142fe562d9a85dc635ccbc8be93e94ed2ae2 (diff) | |
download | chromium_src-0e1fbd2c6e0dcfdcde749a210b0ef3e9cf78acd8.zip chromium_src-0e1fbd2c6e0dcfdcde749a210b0ef3e9cf78acd8.tar.gz chromium_src-0e1fbd2c6e0dcfdcde749a210b0ef3e9cf78acd8.tar.bz2 |
Better account crashes for the BrowserChildProcessHost (and derived) for windowsThe issue here is that OnChildDied() can be called before the process is actually dead, in suchcases the GetChildTerminationStatus returns TERMINATION_STATUS_STILL_RUNNING, because we don'thave yet the actual return code which we ignore in BrowserChildProcessHost.Now we wait until we have the actual return code. This is going to increase the countfor the following histograms:ChildProcess.CrashesChildProcess.KillsAnd will also increase the counts of histograms (if any) on the derived classes:PluginProcessHostUtilityProcessHostGpuProcessHostPpapiPluginProcessHostNaClProcessHostWorkerProcessHostProfileImportProcessHost
and also for renderers:BrowserRenderProcessHostBUG=96059TEST=see bug
Review URL: http://codereview.chromium.org/7888070
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101435 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/browser_child_process_host.h')
-rw-r--r-- | content/browser/browser_child_process_host.h | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/content/browser/browser_child_process_host.h b/content/browser/browser_child_process_host.h index bf5b881..499b632 100644 --- a/content/browser/browser_child_process_host.h +++ b/content/browser/browser_child_process_host.h @@ -8,11 +8,16 @@ #include <list> +#include "base/synchronization/waitable_event_watcher.h" #include "content/browser/child_process_launcher.h" #include "content/common/child_process_host.h" #include "content/common/child_process_info.h" #include "content/common/content_export.h" +namespace base { +class WaitableEvent; +} + // Plugins/workers and other child processes that live on the IO thread should // derive from this class. // @@ -21,10 +26,14 @@ class CONTENT_EXPORT BrowserChildProcessHost : public ChildProcessHost, public ChildProcessInfo, - public ChildProcessLauncher::Client { + public ChildProcessLauncher::Client, + public base::WaitableEventWatcher::Delegate { public: virtual ~BrowserChildProcessHost(); + virtual void OnWaitableEventSignaled( + base::WaitableEvent* waitable_event) OVERRIDE; + // Terminates all child processes and deletes each ChildProcessHost instance. static void TerminateAll(); @@ -87,7 +96,7 @@ class CONTENT_EXPORT BrowserChildProcessHost : virtual base::TerminationStatus GetChildTerminationStatus(int* exit_code); // Overrides from ChildProcessHost - virtual void OnChildDied(); + virtual void OnChildDisconnected(); virtual void ShutdownStarted(); virtual void Notify(int type); // Extends the base class implementation and removes this host from @@ -111,6 +120,10 @@ class CONTENT_EXPORT BrowserChildProcessHost : }; ClientHook client_; scoped_ptr<ChildProcessLauncher> child_process_; +#if defined(OS_WIN) + base::WaitableEventWatcher child_watcher_; +#endif + bool disconnect_was_alive_; }; #endif // CONTENT_BROWSER_BROWSER_CHILD_PROCESS_HOST_H_ |