diff options
author | piman@google.com <piman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-15 22:05:29 +0000 |
---|---|---|
committer | piman@google.com <piman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-15 22:05:29 +0000 |
commit | 54457f38c36e43d9f5d434e5bfc3cb83d9e56926 (patch) | |
tree | aa82f84163493b674038c9e3752d00f605b9ad38 /chrome/browser | |
parent | a1a9e7c87641ad88d189c154293bf602859249f3 (diff) | |
download | chromium_src-54457f38c36e43d9f5d434e5bfc3cb83d9e56926.zip chromium_src-54457f38c36e43d9f5d434e5bfc3cb83d9e56926.tar.gz chromium_src-54457f38c36e43d9f5d434e5bfc3cb83d9e56926.tar.bz2 |
Fix crash reporting for ppapi
BUG=chromium-os:13952
TEST=run chrome with CHROME_HEADLESS=1 and pepper flash, kill -11 the ppapi process, check that a report gets written to disk
Review URL: http://codereview.chromium.org/6864005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81813 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/crash_handler_host_linux.cc | 16 | ||||
-rw-r--r-- | chrome/browser/crash_handler_host_linux.h | 17 | ||||
-rw-r--r-- | chrome/browser/crash_handler_host_linux_stub.cc | 11 |
3 files changed, 44 insertions, 0 deletions
diff --git a/chrome/browser/crash_handler_host_linux.cc b/chrome/browser/crash_handler_host_linux.cc index 0f81959..6138742 100644 --- a/chrome/browser/crash_handler_host_linux.cc +++ b/chrome/browser/crash_handler_host_linux.cc @@ -431,3 +431,19 @@ void RendererCrashHandlerHostLinux::SetProcessType() { RendererCrashHandlerHostLinux* RendererCrashHandlerHostLinux::GetInstance() { return Singleton<RendererCrashHandlerHostLinux>::get(); } + +PpapiCrashHandlerHostLinux::PpapiCrashHandlerHostLinux() { + InitCrashUploaderThread(); +} + +PpapiCrashHandlerHostLinux::~PpapiCrashHandlerHostLinux() { +} + +void PpapiCrashHandlerHostLinux::SetProcessType() { + process_type_ = "ppapi"; +} + +// static +PpapiCrashHandlerHostLinux* PpapiCrashHandlerHostLinux::GetInstance() { + return Singleton<PpapiCrashHandlerHostLinux>::get(); +} diff --git a/chrome/browser/crash_handler_host_linux.h b/chrome/browser/crash_handler_host_linux.h index abbc9fe..3ef2657 100644 --- a/chrome/browser/crash_handler_host_linux.h +++ b/chrome/browser/crash_handler_host_linux.h @@ -146,4 +146,21 @@ class RendererCrashHandlerHostLinux : public CrashHandlerHostLinux { DISALLOW_COPY_AND_ASSIGN(RendererCrashHandlerHostLinux); }; +class PpapiCrashHandlerHostLinux : public CrashHandlerHostLinux { + public: + // Returns the singleton instance. + static PpapiCrashHandlerHostLinux* GetInstance(); + + private: + friend struct DefaultSingletonTraits<PpapiCrashHandlerHostLinux>; + PpapiCrashHandlerHostLinux(); + virtual ~PpapiCrashHandlerHostLinux(); + +#if defined(USE_LINUX_BREAKPAD) + virtual void SetProcessType(); +#endif + + DISALLOW_COPY_AND_ASSIGN(PpapiCrashHandlerHostLinux); +}; + #endif // CHROME_BROWSER_CRASH_HANDLER_HOST_LINUX_H_ diff --git a/chrome/browser/crash_handler_host_linux_stub.cc b/chrome/browser/crash_handler_host_linux_stub.cc index 6c140e5..6891de1 100644 --- a/chrome/browser/crash_handler_host_linux_stub.cc +++ b/chrome/browser/crash_handler_host_linux_stub.cc @@ -58,3 +58,14 @@ RendererCrashHandlerHostLinux::~RendererCrashHandlerHostLinux() { RendererCrashHandlerHostLinux* RendererCrashHandlerHostLinux::GetInstance() { return Singleton<RendererCrashHandlerHostLinux>::get(); } + +PpapiCrashHandlerHostLinux::PpapiCrashHandlerHostLinux() { +} + +PpapiCrashHandlerHostLinux::~PpapiCrashHandlerHostLinux() { +} + +// static +PpapiCrashHandlerHostLinux* PpapiCrashHandlerHostLinux::GetInstance() { + return Singleton<PpapiCrashHandlerHostLinux>::get(); +} |