| 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 28 matching lines...) Expand all Loading... |
| 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/Compiler.h" | 43 #include "wtf/Compiler.h" |
| 44 #include "wtf/WTFExport.h" | 44 #include "wtf/WTFExport.h" |
| 45 | 45 |
| 46 // Users must test "#if ENABLE(ASSERT)", which helps ensure that code | 46 // Users must test "#if ENABLE(ASSERT)", which helps ensure that code |
| 47 // testing this macro has included this header. | 47 // testing this macro has included this header. |
| 48 #ifndef ENABLE_ASSERT | 48 #ifndef ENABLE_ASSERT |
| 49 #ifdef NDEBUG | 49 #if defined(NDEBUG) && !defined(DCHECK_ALWAYS_ON) |
| 50 /* Disable ASSERT* macros in release mode by default. */ | 50 /* Disable ASSERT* macros in release mode by default. */ |
| 51 #define ENABLE_ASSERT 0 | 51 #define ENABLE_ASSERT 0 |
| 52 #else | 52 #else |
| 53 #define ENABLE_ASSERT 1 | 53 #define ENABLE_ASSERT 1 |
| 54 #endif /* NDEBUG */ | 54 #endif /* defined(NDEBUG) && !defined(DCHECK_ALWAYS_ON) */ |
| 55 #endif | 55 #endif |
| 56 | 56 |
| 57 #ifndef BACKTRACE_DISABLED | 57 #ifndef BACKTRACE_DISABLED |
| 58 #define BACKTRACE_DISABLED !ENABLE(ASSERT) | 58 #define BACKTRACE_DISABLED !ENABLE(ASSERT) |
| 59 #endif | 59 #endif |
| 60 | 60 |
| 61 #ifndef ASSERT_MSG_DISABLED | 61 #ifndef ASSERT_MSG_DISABLED |
| 62 #define ASSERT_MSG_DISABLED !ENABLE(ASSERT) | 62 #define ASSERT_MSG_DISABLED !ENABLE(ASSERT) |
| 63 #endif | 63 #endif |
| 64 | 64 |
| (...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 419 } \ | 419 } \ |
| 420 inline const thisType& to##thisType(const argumentType& argumentName) \ | 420 inline const thisType& to##thisType(const argumentType& argumentName) \ |
| 421 { \ | 421 { \ |
| 422 ASSERT_WITH_SECURITY_IMPLICATION(referencePredicate); \ | 422 ASSERT_WITH_SECURITY_IMPLICATION(referencePredicate); \ |
| 423 return static_cast<const thisType&>(argumentName); \ | 423 return static_cast<const thisType&>(argumentName); \ |
| 424 } \ | 424 } \ |
| 425 void to##thisType(const thisType*); \ | 425 void to##thisType(const thisType*); \ |
| 426 void to##thisType(const thisType&) | 426 void to##thisType(const thisType&) |
| 427 | 427 |
| 428 #endif /* WTF_Assertions_h */ | 428 #endif /* WTF_Assertions_h */ |
| OLD | NEW |