diff options
author | cpu@chromium.org <cpu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-16 23:07:05 +0000 |
---|---|---|
committer | cpu@chromium.org <cpu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-16 23:07:05 +0000 |
commit | a3a7e2c07a1dcac13b004257982bb174e681693c (patch) | |
tree | 4eaaaff74dd1ca3c96d93c15d1b9123bbdd77e83 /content/browser/browser_child_process_host.h | |
parent | c0bcb01f4d832c493e320198ac31f31cc067fc5d (diff) | |
download | chromium_src-a3a7e2c07a1dcac13b004257982bb174e681693c.zip chromium_src-a3a7e2c07a1dcac13b004257982bb174e681693c.tar.gz chromium_src-a3a7e2c07a1dcac13b004257982bb174e681693c.tar.bz2 |
Trying to reland r101435 : Better account crashes for the BrowserChildProcessHost
original code review:
http://codereview.chromium.org/7888070
In this change we remove renderer_host piece, which I landed already and fixes the
problem which was a missing break (line 170, see patch set 2).
TBR=jam
BUG=96059
TEST=see bug
Review URL: http://codereview.chromium.org/7919016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101595 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_ |