diff options
author | The Android Open Source Project <initial-contribution@android.com> | 2009-03-05 14:34:32 -0800 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-03-05 14:34:32 -0800 |
commit | 635860845790a19bf50bbc51ba8fb66a96dde068 (patch) | |
tree | ef6ad9ff73a5b57f65249d4232a202fa77e6a140 /JavaScriptCore/wtf/Assertions.h | |
parent | 8e35f3cfc7fba1d1c829dc557ebad6409cbe16a2 (diff) | |
download | external_webkit-635860845790a19bf50bbc51ba8fb66a96dde068.zip external_webkit-635860845790a19bf50bbc51ba8fb66a96dde068.tar.gz external_webkit-635860845790a19bf50bbc51ba8fb66a96dde068.tar.bz2 |
auto import from //depot/cupcake/@136594
Diffstat (limited to 'JavaScriptCore/wtf/Assertions.h')
-rw-r--r-- | JavaScriptCore/wtf/Assertions.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/JavaScriptCore/wtf/Assertions.h b/JavaScriptCore/wtf/Assertions.h index 8449563..c17e501 100644 --- a/JavaScriptCore/wtf/Assertions.h +++ b/JavaScriptCore/wtf/Assertions.h @@ -120,11 +120,22 @@ void WTFLogVerbose(const char* file, int line, const char* function, WTFLogChann /* CRASH -- gets us into the debugger or the crash reporter -- signals are ignored by the crash reporter so we must do better */ #ifndef CRASH -#define CRASH() *(int *)(uintptr_t)0xbbadbeef = 0 +#define CRASH() do { \ + *(int *)(uintptr_t)0xbbadbeef = 0; \ + ((void(*)())0)(); /* More reliable, but doesn't say BBADBEEF */ \ +} while(false) #endif /* ASSERT, ASSERT_WITH_MESSAGE, ASSERT_NOT_REACHED */ +#if PLATFORM(WIN_CE) +/* FIXME: We include this here only to avoid a conflict with the ASSERT macro. */ +#include <windows.h> +#undef min +#undef max +#undef ERROR +#endif + #if PLATFORM(WIN_OS) /* FIXME: Change to use something other than ASSERT to avoid this conflict with win32. */ #undef ASSERT @@ -135,6 +146,7 @@ void WTFLogVerbose(const char* file, int line, const char* function, WTFLogChann #define ASSERT(assertion) ((void)0) #define ASSERT_WITH_MESSAGE(assertion, ...) ((void)0) #define ASSERT_NOT_REACHED() ((void)0) +#define ASSERT_UNUSED(variable, assertion) ((void)variable) #else @@ -159,6 +171,8 @@ while (0) CRASH(); \ } while (0) +#define ASSERT_UNUSED(variable, assertion) ASSERT(assertion) + #endif /* ASSERT_ARG */ |