summaryrefslogtreecommitdiffstats
path: root/chrome/app
diff options
context:
space:
mode:
authorrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-17 00:34:09 +0000
committerrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-17 00:34:09 +0000
commitecb924c963706ef0c1c7bf149f8e74736272c442 (patch)
treeb85a0476a31c34e2089663f0e8128fcf31f55406 /chrome/app
parenta7bdff4fae714f46cc7e0b9f5fbc61bbf849c876 (diff)
downloadchromium_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.cc12
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