| 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 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 // http://code.google.com/p/chromium/issues/entry?template=Security%20Bug | 255 // http://code.google.com/p/chromium/issues/entry?template=Security%20Bug |
| 256 // RELEASE_ASSERT is deprecated. We should use CHECK() instead. | 256 // RELEASE_ASSERT is deprecated. We should use CHECK() instead. |
| 257 #if ENABLE(ASSERT) | 257 #if ENABLE(ASSERT) |
| 258 #define RELEASE_ASSERT(assertion) ASSERT(assertion) | 258 #define RELEASE_ASSERT(assertion) ASSERT(assertion) |
| 259 #elif defined(ADDRESS_SANITIZER) | 259 #elif defined(ADDRESS_SANITIZER) |
| 260 #define RELEASE_ASSERT(condition) SECURITY_CHECK(condition) | 260 #define RELEASE_ASSERT(condition) SECURITY_CHECK(condition) |
| 261 #else | 261 #else |
| 262 #define RELEASE_ASSERT(assertion) \ | 262 #define RELEASE_ASSERT(assertion) \ |
| 263 (UNLIKELY(!(assertion)) ? (IMMEDIATE_CRASH()) : (void)0) | 263 (UNLIKELY(!(assertion)) ? (IMMEDIATE_CRASH()) : (void)0) |
| 264 #endif | 264 #endif |
| 265 // TODO(tkent): Move this to base/logging.h? | |
| 266 #define RELEASE_NOTREACHED() LOG(FATAL) | |
| 267 | 265 |
| 268 // DEFINE_COMPARISON_OPERATORS_WITH_REFERENCES | 266 // DEFINE_COMPARISON_OPERATORS_WITH_REFERENCES |
| 269 // Allow equality comparisons of Objects by reference or pointer, | 267 // Allow equality comparisons of Objects by reference or pointer, |
| 270 // interchangeably. This can be only used on types whose equality makes no | 268 // interchangeably. This can be only used on types whose equality makes no |
| 271 // other sense than pointer equality. | 269 // other sense than pointer equality. |
| 272 #define DEFINE_COMPARISON_OPERATORS_WITH_REFERENCES(thisType) \ | 270 #define DEFINE_COMPARISON_OPERATORS_WITH_REFERENCES(thisType) \ |
| 273 inline bool operator==(const thisType& a, const thisType& b) { \ | 271 inline bool operator==(const thisType& a, const thisType& b) { \ |
| 274 return &a == &b; \ | 272 return &a == &b; \ |
| 275 } \ | 273 } \ |
| 276 inline bool operator==(const thisType& a, const thisType* b) { \ | 274 inline bool operator==(const thisType& a, const thisType* b) { \ |
| (...skipping 29 matching lines...) Expand all Loading... |
| 306 return static_cast<thisType&>(argumentName); \ | 304 return static_cast<thisType&>(argumentName); \ |
| 307 } \ | 305 } \ |
| 308 inline const thisType& to##thisType(const argumentType& argumentName) { \ | 306 inline const thisType& to##thisType(const argumentType& argumentName) { \ |
| 309 SECURITY_DCHECK(referencePredicate); \ | 307 SECURITY_DCHECK(referencePredicate); \ |
| 310 return static_cast<const thisType&>(argumentName); \ | 308 return static_cast<const thisType&>(argumentName); \ |
| 311 } \ | 309 } \ |
| 312 void to##thisType(const thisType*); \ | 310 void to##thisType(const thisType*); \ |
| 313 void to##thisType(const thisType&) | 311 void to##thisType(const thisType&) |
| 314 | 312 |
| 315 #endif // WTF_Assertions_h | 313 #endif // WTF_Assertions_h |
| OLD | NEW |