diff options
author | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-17 00:34:09 +0000 |
---|---|---|
committer | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-17 00:34:09 +0000 |
commit | ecb924c963706ef0c1c7bf149f8e74736272c442 (patch) | |
tree | b85a0476a31c34e2089663f0e8128fcf31f55406 /chrome/app | |
parent | a7bdff4fae714f46cc7e0b9f5fbc61bbf849c876 (diff) | |
download | chromium_src-ecb924c963706ef0c1c7bf149f8e74736272c442.zip chromium_src-ecb924c963706ef0c1c7bf149f8e74736272c442.tar.gz chromium_src-ecb924c963706ef0c1c7bf149f8e74736272c442.tar.bz2 |
Add an exception wrapper to the WindowProc functions so
that we receive crash reports when something goes wrong.
BUG=63702
TEST=base_unittests
Review URL: http://codereview.chromium.org/6697004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78475 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/app')
-rw-r--r-- | chrome/app/breakpad_win.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/chrome/app/breakpad_win.cc b/chrome/app/breakpad_win.cc index b860bef..dfff428 100644 --- a/chrome/app/breakpad_win.cc +++ b/chrome/app/breakpad_win.cc @@ -438,6 +438,18 @@ bool ShowRestartDialogIfCrashed(bool* exit_now) { flags, exit_now); } +// Crashes the process after generating a dump for the provided exception. Note +// that the crash reporter should be initialized before calling this function +// for it to do anything. +extern "C" int __declspec(dllexport) CrashForException( + EXCEPTION_POINTERS* info) { + if (g_breakpad) { + g_breakpad->WriteMinidumpForException(info); + ::ExitProcess(ResultCodes::KILLED); + } + return EXCEPTION_CONTINUE_SEARCH; +} + // Determine whether configuration management allows loading the crash reporter. // Since the configuration management infrastructure is not initialized at this // point, we read the corresponding registry key directly. The return status |