summaryrefslogtreecommitdiffstats
path: root/chrome_frame/chrome_frame_reporting.cc
diff options
context:
space:
mode:
authorrobertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-28 00:45:08 +0000
committerrobertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-28 00:45:08 +0000
commit219d1a6b592cfcb4028b4ff58bb3b4bb4e1684ec (patch)
treeaee53daa006731931e148338f5fdcdc06db2ed24 /chrome_frame/chrome_frame_reporting.cc
parentf24cd4f823335a899eba16aafe28d56f907f4b33 (diff)
downloadchromium_src-219d1a6b592cfcb4028b4ff58bb3b4bb4e1684ec.zip
chromium_src-219d1a6b592cfcb4028b4ff58bb3b4bb4e1684ec.tar.gz
chromium_src-219d1a6b592cfcb4028b4ff58bb3b4bb4e1684ec.tar.bz2
Add an ExceptionBarrier around outbound calls to patched methods in IE. In so doing, we have an SEH present in the SEH chain and so the VEH won't erroneously report crashes that occur in other modules when we happen to be on the stack.
BUG=42660 TEST=Less false positives in the crash reports. Review URL: http://codereview.chromium.org/1733021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45764 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/chrome_frame_reporting.cc')
-rw-r--r--chrome_frame/chrome_frame_reporting.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/chrome_frame/chrome_frame_reporting.cc b/chrome_frame/chrome_frame_reporting.cc
index 202d43c..556747b2 100644
--- a/chrome_frame/chrome_frame_reporting.cc
+++ b/chrome_frame/chrome_frame_reporting.cc
@@ -11,6 +11,7 @@
#include "chrome/installer/util/google_update_settings.h"
#include "chrome/installer/util/install_util.h"
#include "chrome_frame/chrome_frame_reporting.h"
+#include "chrome_frame/exception_barrier.h"
#include "chrome_frame/utils.h"
// Well known SID for the system principal.
@@ -45,6 +46,11 @@ google_breakpad::CustomClientInfo* GetCustomInfo(const wchar_t* dll_path) {
return &custom_info;
}
+
+void CALLBACK BreakpadHandler(EXCEPTION_POINTERS *ptrs) {
+ WriteMinidumpForException(ptrs);
+}
+
extern "C" IMAGE_DOS_HEADER __ImageBase;
bool InitializeCrashReporting() {
@@ -55,6 +61,10 @@ bool InitializeCrashReporting() {
if (!always_take_dump && !GoogleUpdateSettings::GetCollectStatsConsent())
return true;
+ // Set the handler for ExceptionBarrier for this module:
+ DCHECK(ExceptionBarrier::handler() == NULL);
+ ExceptionBarrier::set_handler(BreakpadHandler);
+
// Get the alternate dump directory. We use the temp path.
FilePath temp_directory;
if (!file_util::GetTempDir(&temp_directory) || temp_directory.empty()) {