diff options
author | cpu@chromium.org <cpu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-27 00:55:14 +0000 |
---|---|---|
committer | cpu@chromium.org <cpu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-27 00:55:14 +0000 |
commit | 3d50157e48f52a3da938bca980e936f254ecedc9 (patch) | |
tree | dda6fc6e57e88411fd111e03bfbe14b75dae68d4 /chrome_frame | |
parent | 6d5c5122889fd2295618eb59ff5bcc83d6ca2654 (diff) | |
download | chromium_src-3d50157e48f52a3da938bca980e936f254ecedc9.zip chromium_src-3d50157e48f52a3da938bca980e936f254ecedc9.tar.gz chromium_src-3d50157e48f52a3da938bca980e936f254ecedc9.tar.bz2 |
Make chrome compile with the win8 sdk
So we can move the metro bits to src
The EXCEPTION_REGISTRATION_RECORD is now defined along
with a definition of Handler.
BUG=127799
TEST= it builds
Review URL: https://chromiumcodereview.appspot.com/10636046
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@144342 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame')
-rw-r--r-- | chrome_frame/crash_reporting/vectored_handler-impl.h | 14 | ||||
-rw-r--r-- | chrome_frame/crash_reporting/veh_test.h | 22 |
2 files changed, 28 insertions, 8 deletions
diff --git a/chrome_frame/crash_reporting/vectored_handler-impl.h b/chrome_frame/crash_reporting/vectored_handler-impl.h index 277c34b..eb317a8 100644 --- a/chrome_frame/crash_reporting/vectored_handler-impl.h +++ b/chrome_frame/crash_reporting/vectored_handler-impl.h @@ -9,18 +9,17 @@ #include "chrome_frame/crash_reporting/vectored_handler.h" #include "chrome_frame/crash_reporting/nt_loader.h" -#if defined(_M_IX86) +#if !defined(_M_IX86) +#error only x86 is supported for now. +#endif + #ifndef EXCEPTION_CHAIN_END #define EXCEPTION_CHAIN_END ((struct _EXCEPTION_REGISTRATION_RECORD*)-1) +#if !defined(_WIN32_WINNT_WIN8) typedef struct _EXCEPTION_REGISTRATION_RECORD { struct _EXCEPTION_REGISTRATION_RECORD* Next; PVOID Handler; } EXCEPTION_REGISTRATION_RECORD; -#endif // EXCEPTION_CHAIN_END -#else -#error only x86 is supported for now. -#endif - // VEH handler flags settings. // These are grabbed from winnt.h for PocketPC. // Only EXCEPTION_NONCONTINUABLE in defined in "regular" winnt.h @@ -38,7 +37,8 @@ typedef struct _EXCEPTION_REGISTRATION_RECORD { #define IS_UNWINDING(Flag) (((Flag) & EXCEPTION_UNWIND) != 0) #define IS_DISPATCHING(Flag) (((Flag) & EXCEPTION_UNWIND) == 0) #define IS_TARGET_UNWIND(Flag) ((Flag) & EXCEPTION_TARGET_UNWIND) -// End of grabbed section +#endif // !defined(_WIN32_WINNT_WIN8) +#endif // EXCEPTION_CHAIN_END template <typename E> VectoredHandlerT<E>::VectoredHandlerT(E* api) : exceptions_seen_(0), api_(api) { diff --git a/chrome_frame/crash_reporting/veh_test.h b/chrome_frame/crash_reporting/veh_test.h index c69da73..ed0d3ca 100644 --- a/chrome_frame/crash_reporting/veh_test.h +++ b/chrome_frame/crash_reporting/veh_test.h @@ -9,10 +9,29 @@ #ifndef EXCEPTION_CHAIN_END #define EXCEPTION_CHAIN_END ((struct _EXCEPTION_REGISTRATION_RECORD*)-1) +#if !defined(_WIN32_WINNT_WIN8) typedef struct _EXCEPTION_REGISTRATION_RECORD { struct _EXCEPTION_REGISTRATION_RECORD* Next; PVOID Handler; } EXCEPTION_REGISTRATION_RECORD; +// VEH handler flags settings. +// These are grabbed from winnt.h for PocketPC. +// Only EXCEPTION_NONCONTINUABLE in defined in "regular" winnt.h +// #define EXCEPTION_NONCONTINUABLE 0x1 // Noncontinuable exception +#define EXCEPTION_UNWINDING 0x2 // Unwind is in progress +#define EXCEPTION_EXIT_UNWIND 0x4 // Exit unwind is in progress +#define EXCEPTION_STACK_INVALID 0x8 // Stack out of limits or unaligned +#define EXCEPTION_NESTED_CALL 0x10 // Nested exception handler call +#define EXCEPTION_TARGET_UNWIND 0x20 // Target unwind in progress +#define EXCEPTION_COLLIDED_UNWIND 0x40 // Collided exception handler call + +#define EXCEPTION_UNWIND (EXCEPTION_UNWINDING | EXCEPTION_EXIT_UNWIND | \ + EXCEPTION_TARGET_UNWIND | EXCEPTION_COLLIDED_UNWIND) + +#define IS_UNWINDING(Flag) (((Flag) & EXCEPTION_UNWIND) != 0) +#define IS_DISPATCHING(Flag) (((Flag) & EXCEPTION_UNWIND) == 0) +#define IS_TARGET_UNWIND(Flag) ((Flag) & EXCEPTION_TARGET_UNWIND) +#endif // !defined(_WIN32_WINNT_WIN8) #endif // EXCEPTION_CHAIN_END class ExceptionInfo : public _EXCEPTION_POINTERS { @@ -51,7 +70,8 @@ struct SEHChain { int i = 0; for (; p; ++i) { CHECK(i + 1 < arraysize(chain_)); - chain_[i].Handler = const_cast<void*>(p); + chain_[i].Handler = + reinterpret_cast<PEXCEPTION_ROUTINE>(const_cast<void*>(p)); chain_[i].Next = &chain_[i + 1]; p = va_arg(vl, const void*); } |