From 635860845790a19bf50bbc51ba8fb66a96dde068 Mon Sep 17 00:00:00 2001 From: The Android Open Source Project Date: Thu, 5 Mar 2009 14:34:32 -0800 Subject: auto import from //depot/cupcake/@136594 --- JavaScriptCore/wtf/Assertions.h | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'JavaScriptCore/wtf/Assertions.h') 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 +#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 */ -- cgit v1.1