Avoid reporting crashes for exceptions that hit our SEH from calls to the original implementation of BindToStorage() when we do not wrap the bind status callback.
BUG=42660
TEST=Induce exception in code called under original IMoniker::BindToStorage implementation when we don't wrap the callback and notice that no crash is reported.
Review URL: http://codereview.chromium.org/1748016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46176 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome_frame/chrome_frame_reporting.cc b/chrome_frame/chrome_frame_reporting.cc
index 556747b2..807599c8 100644
--- a/chrome_frame/chrome_frame_reporting.cc
+++ b/chrome_frame/chrome_frame_reporting.cc
@@ -46,11 +46,6 @@
return &custom_info;
}
-
-void CALLBACK BreakpadHandler(EXCEPTION_POINTERS *ptrs) {
- WriteMinidumpForException(ptrs);
-}
-
extern "C" IMAGE_DOS_HEADER __ImageBase;
bool InitializeCrashReporting() {
@@ -61,9 +56,9 @@
if (!always_take_dump && !GoogleUpdateSettings::GetCollectStatsConsent())
return true;
- // Set the handler for ExceptionBarrier for this module:
- DCHECK(ExceptionBarrier::handler() == NULL);
- ExceptionBarrier::set_handler(BreakpadHandler);
+ // If we got here, we want to report crashes, so make sure all
+ // ExceptionBarrierBase instances do so.
+ ExceptionBarrierConfig::set_enabled(true);
// Get the alternate dump directory. We use the temp path.
FilePath temp_directory;
@@ -97,5 +92,6 @@
}
bool ShutdownCrashReporting() {
+ ExceptionBarrierConfig::set_enabled(false);
return ShutdownVectoredCrashReporting();
}