Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4813)

Unified Diff: chrome_frame/crash_reporting/crash_report.cc

Issue 1748016: Avoid reporting crashes for exceptions that hit our SEH from calls to the ori... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome_frame/crash_reporting/crash_report.cc
===================================================================
--- chrome_frame/crash_reporting/crash_report.cc (revision 45859)
+++ chrome_frame/crash_reporting/crash_report.cc (working copy)
@@ -47,36 +47,6 @@
#pragma code_seg(push, ".text$vm")
#include "chrome_frame/crash_reporting/vectored_handler-impl.h"
-// Use Win32 API; use breakpad for dumps; checks for single (current) module.
-class CrashHandlerTraits : public Win32VEHTraits,
- public ModuleOfInterestWithExcludedRegion {
- public:
- CrashHandlerTraits() {}
-
- // Note that breakpad_lock must be held when this is called.
- void Init(google_breakpad::ExceptionHandler* breakpad, Lock* breakpad_lock) {
- DCHECK(breakpad);
- DCHECK(breakpad_lock);
- breakpad_lock->AssertAcquired();
-
- Win32VEHTraits::InitializeIgnoredBlocks();
- ModuleOfInterestWithExcludedRegion::SetCurrentModule();
- // Pointers to static (non-extern) functions take the address of the
- // function's first byte, as opposed to an entry in the compiler generated
- // JMP table. In release builds /OPT:REF wipes away the JMP table, but debug
- // builds are not so lucky.
- ModuleOfInterestWithExcludedRegion::SetExcludedRegion(&veh_segment_start,
- &veh_segment_end);
- }
-
- void Shutdown() {
- }
-
- inline bool WriteDump(EXCEPTION_POINTERS* p) {
- return WriteMinidumpForException(p);
- }
-};
-
class CrashHandler {
public:
CrashHandler() : veh_id_(NULL), handler_(&crash_api_) {}
@@ -115,14 +85,17 @@
if (veh_id_)
return true;
+ crash_api_.Init(&veh_segment_start, &veh_segment_end,
+ &WriteMinidumpForException);
+
void* id = ::AddVectoredExceptionHandler(FALSE, &VectoredHandlerEntryPoint);
if (id != NULL) {
veh_id_ = id;
- crash_api_.Init(breakpad, breakpad_lock);
return true;
+ } else {
+ crash_api_.Shutdown();
+ return false;
}
-
- return false;
}
void CrashHandler::Shutdown() {

Powered by Google App Engine
This is Rietveld 408576698