OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2003, 2006, 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2003, 2006, 2007 Apple Inc. All rights reserved. |
3 * Copyright (C) 2013 Google Inc. All rights reserved. | 3 * Copyright (C) 2013 Google Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 WTFReportBacktrace(); \ | 173 WTFReportBacktrace(); \ |
174 } while(false) | 174 } while(false) |
175 | 175 |
176 #endif | 176 #endif |
177 | 177 |
178 /* ASSERT, ASSERT_NOT_REACHED, ASSERT_UNUSED | 178 /* ASSERT, ASSERT_NOT_REACHED, ASSERT_UNUSED |
179 | 179 |
180 These macros are compiled out of release builds. | 180 These macros are compiled out of release builds. |
181 Expressions inside them are evaluated in debug builds only. | 181 Expressions inside them are evaluated in debug builds only. |
182 */ | 182 */ |
183 #if OS(WINDOWS) | 183 #if OS(WIN) |
184 /* FIXME: Change to use something other than ASSERT to avoid this conflict with
the underlying platform */ | 184 /* FIXME: Change to use something other than ASSERT to avoid this conflict with
the underlying platform */ |
185 #undef ASSERT | 185 #undef ASSERT |
186 #endif | 186 #endif |
187 | 187 |
188 #if ASSERT_DISABLED | 188 #if ASSERT_DISABLED |
189 | 189 |
190 #define ASSERT(assertion) ((void)0) | 190 #define ASSERT(assertion) ((void)0) |
191 #define ASSERT_AT(assertion, file, line, function) ((void)0) | 191 #define ASSERT_AT(assertion, file, line, function) ((void)0) |
192 #define ASSERT_NOT_REACHED() ((void)0) | 192 #define ASSERT_NOT_REACHED() ((void)0) |
193 #define NO_RETURN_DUE_TO_ASSERT | 193 #define NO_RETURN_DUE_TO_ASSERT |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 #define RELEASE_ASSERT(assertion) (UNLIKELY(!(assertion)) ? (IMMEDIATE_CRASH())
: (void)0) | 364 #define RELEASE_ASSERT(assertion) (UNLIKELY(!(assertion)) ? (IMMEDIATE_CRASH())
: (void)0) |
365 #define RELEASE_ASSERT_WITH_MESSAGE(assertion, ...) RELEASE_ASSERT(assertion) | 365 #define RELEASE_ASSERT_WITH_MESSAGE(assertion, ...) RELEASE_ASSERT(assertion) |
366 #define RELEASE_ASSERT_NOT_REACHED() IMMEDIATE_CRASH() | 366 #define RELEASE_ASSERT_NOT_REACHED() IMMEDIATE_CRASH() |
367 #else | 367 #else |
368 #define RELEASE_ASSERT(assertion) ASSERT(assertion) | 368 #define RELEASE_ASSERT(assertion) ASSERT(assertion) |
369 #define RELEASE_ASSERT_WITH_MESSAGE(assertion, ...) ASSERT_WITH_MESSAGE(assertio
n, __VA_ARGS__) | 369 #define RELEASE_ASSERT_WITH_MESSAGE(assertion, ...) ASSERT_WITH_MESSAGE(assertio
n, __VA_ARGS__) |
370 #define RELEASE_ASSERT_NOT_REACHED() ASSERT_NOT_REACHED() | 370 #define RELEASE_ASSERT_NOT_REACHED() ASSERT_NOT_REACHED() |
371 #endif | 371 #endif |
372 | 372 |
373 #endif /* WTF_Assertions_h */ | 373 #endif /* WTF_Assertions_h */ |
OLD | NEW |