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 22 matching lines...) Expand all Loading... |
33 Note, this file uses many GCC extensions, but it should be compatible with | 33 Note, this file uses many GCC extensions, but it should be compatible with |
34 C, Objective C, C++, and Objective C++. | 34 C, Objective C, C++, and Objective C++. |
35 | 35 |
36 For non-debug builds, everything is disabled by default, except for the | 36 For non-debug builds, everything is disabled by default, except for the |
37 RELEASE_ASSERT family of macros. | 37 RELEASE_ASSERT family of macros. |
38 | 38 |
39 Defining any of the symbols explicitly prevents this from having any effect. | 39 Defining any of the symbols explicitly prevents this from having any effect. |
40 | 40 |
41 */ | 41 */ |
42 | 42 |
| 43 #include "wtf/Platform.h" |
| 44 |
43 #include <stddef.h> | 45 #include <stddef.h> |
44 | 46 |
45 #if !COMPILER(MSVC) | 47 #if !COMPILER(MSVC) |
46 #include <inttypes.h> | 48 #include <inttypes.h> |
47 #endif | 49 #endif |
48 | 50 |
49 #include "wtf/WTFExport.h" | 51 #include "wtf/WTFExport.h" |
50 | 52 |
51 #ifdef NDEBUG | 53 #ifdef NDEBUG |
52 /* Disable ASSERT* macros in release mode. */ | 54 /* Disable ASSERT* macros in release mode. */ |
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
370 #define RELEASE_ASSERT(assertion) (UNLIKELY(!(assertion)) ? (IMMEDIATE_CRASH())
: (void)0) | 372 #define RELEASE_ASSERT(assertion) (UNLIKELY(!(assertion)) ? (IMMEDIATE_CRASH())
: (void)0) |
371 #define RELEASE_ASSERT_WITH_MESSAGE(assertion, ...) RELEASE_ASSERT(assertion) | 373 #define RELEASE_ASSERT_WITH_MESSAGE(assertion, ...) RELEASE_ASSERT(assertion) |
372 #define RELEASE_ASSERT_NOT_REACHED() IMMEDIATE_CRASH() | 374 #define RELEASE_ASSERT_NOT_REACHED() IMMEDIATE_CRASH() |
373 #else | 375 #else |
374 #define RELEASE_ASSERT(assertion) ASSERT(assertion) | 376 #define RELEASE_ASSERT(assertion) ASSERT(assertion) |
375 #define RELEASE_ASSERT_WITH_MESSAGE(assertion, ...) ASSERT_WITH_MESSAGE(assertio
n, __VA_ARGS__) | 377 #define RELEASE_ASSERT_WITH_MESSAGE(assertion, ...) ASSERT_WITH_MESSAGE(assertio
n, __VA_ARGS__) |
376 #define RELEASE_ASSERT_NOT_REACHED() ASSERT_NOT_REACHED() | 378 #define RELEASE_ASSERT_NOT_REACHED() ASSERT_NOT_REACHED() |
377 #endif | 379 #endif |
378 | 380 |
379 #endif /* WTF_Assertions_h */ | 381 #endif /* WTF_Assertions_h */ |
OLD | NEW |