OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_FRAME_CRASH_REPORTING_VECTORED_HANDLER_IMPL_H_ | 5 #ifndef CHROME_FRAME_CRASH_REPORTING_VECTORED_HANDLER_IMPL_H_ |
6 #define CHROME_FRAME_CRASH_REPORTING_VECTORED_HANDLER_IMPL_H_ | 6 #define CHROME_FRAME_CRASH_REPORTING_VECTORED_HANDLER_IMPL_H_ |
7 #include "chrome_frame/crash_reporting/vectored_handler.h" | 7 #include "chrome_frame/crash_reporting/vectored_handler.h" |
8 | 8 |
9 #if defined(_M_IX86) | 9 #if defined(_M_IX86) |
10 typedef struct _EXCEPTION_REGISTRATION_RECORD { | 10 typedef struct _EXCEPTION_REGISTRATION_RECORD { |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 | 58 |
59 // Ignore custom exception codes. | 59 // Ignore custom exception codes. |
60 // MSXML likes to raise 0xE0000001 while parsing. | 60 // MSXML likes to raise 0xE0000001 while parsing. |
61 // Note the C++ SEH (0xE06D7363) also fails in that range. | 61 // Note the C++ SEH (0xE06D7363) also fails in that range. |
62 if (exceptionCode & APPLICATION_ERROR_MASK) { | 62 if (exceptionCode & APPLICATION_ERROR_MASK) { |
63 return ExceptionContinueSearch; | 63 return ExceptionContinueSearch; |
64 } | 64 } |
65 | 65 |
66 ++VectoredHandlerT<E>::g_exceptions_seen; | 66 ++VectoredHandlerT<E>::g_exceptions_seen; |
67 | 67 |
68 // TODO(stoyan): Check whether exception address is inbetween | 68 // Check whether exception address is inbetween |
69 // [IsBadReadPtr, IsBadReadPtr + 0xXX] | 69 // [IsBadReadPtr, IsBadReadPtr + 0xXX] |
| 70 if (E::ShouldIgnoreException(exceptionInfo)) { |
| 71 return ExceptionContinueSearch; |
| 72 } |
70 | 73 |
71 const DWORD exceptionFlags = exceptionInfo->ExceptionRecord->ExceptionFlags; | 74 const DWORD exceptionFlags = exceptionInfo->ExceptionRecord->ExceptionFlags; |
72 // I don't think VEH is called on unwind. Just to be safe. | 75 // I don't think VEH is called on unwind. Just to be safe. |
73 if (IS_DISPATCHING(exceptionFlags)) { | 76 if (IS_DISPATCHING(exceptionFlags)) { |
74 if (ModuleHasInstalledSEHFilter()) | 77 if (ModuleHasInstalledSEHFilter()) |
75 return ExceptionContinueSearch; | 78 return ExceptionContinueSearch; |
76 | 79 |
77 if (E::IsOurModule(exceptionInfo->ExceptionRecord->ExceptionAddress)) { | 80 if (E::IsOurModule(exceptionInfo->ExceptionRecord->ExceptionAddress)) { |
78 E::WriteDump(exceptionInfo); | 81 E::WriteDump(exceptionInfo); |
79 return ExceptionContinueSearch; | 82 return ExceptionContinueSearch; |
(...skipping 24 matching lines...) Expand all Loading... |
104 if (E::IsOurModule(RegistrationFrame->Handler)) { | 107 if (E::IsOurModule(RegistrationFrame->Handler)) { |
105 return TRUE; | 108 return TRUE; |
106 } | 109 } |
107 | 110 |
108 RegistrationFrame = RegistrationFrame->Next; | 111 RegistrationFrame = RegistrationFrame->Next; |
109 } | 112 } |
110 | 113 |
111 return FALSE; | 114 return FALSE; |
112 } | 115 } |
113 #endif // CHROME_FRAME_CRASH_REPORTING_VECTORED_HANDLER_IMPL_H_ | 116 #endif // CHROME_FRAME_CRASH_REPORTING_VECTORED_HANDLER_IMPL_H_ |
OLD | NEW |