| Index: third_party/WebKit/Source/wtf/Assertions.h
|
| diff --git a/third_party/WebKit/Source/wtf/Assertions.h b/third_party/WebKit/Source/wtf/Assertions.h
|
| index ea39eb04410571c641950a84d519baacf591e765..438e7aa9de8955502c9d843da3f64aa02f6404fc 100644
|
| --- a/third_party/WebKit/Source/wtf/Assertions.h
|
| +++ b/third_party/WebKit/Source/wtf/Assertions.h
|
| @@ -223,21 +223,6 @@ class WTF_EXPORT ScopedLogger {
|
|
|
| #endif
|
|
|
| -// ASSERT_WITH_SECURITY_IMPLICATION
|
| -// It is deprecated. ASSERT_WITH_SECURITY_IMPLICATION should be replaced
|
| -// with SECURITY_DCHECK.
|
| -#ifdef ADDRESS_SANITIZER
|
| -
|
| -#define ASSERT_WITH_SECURITY_IMPLICATION(assertion) \
|
| - (!(assertion) ? (WTFReportAssertionFailure(__FILE__, __LINE__, \
|
| - WTF_PRETTY_FUNCTION, #assertion), \
|
| - CRASH()) \
|
| - : (void)0)
|
| -
|
| -#else
|
| -#define ASSERT_WITH_SECURITY_IMPLICATION(assertion) ASSERT(assertion)
|
| -#endif
|
| -
|
| // Users must test "#if ENABLE(SECURITY_ASSERT)", which helps ensure
|
| // that code testing this macro has included this header.
|
| #if defined(ADDRESS_SANITIZER) || ENABLE(ASSERT)
|
| @@ -305,27 +290,26 @@ class WTF_EXPORT ScopedLogger {
|
| }
|
|
|
| // DEFINE_TYPE_CASTS
|
| -// Provide static_cast<> wrappers with ASSERT_WITH_SECURITY_IMPLICATION for bad
|
| -// casts.
|
| -#define DEFINE_TYPE_CASTS(thisType, argumentType, argumentName, \
|
| - pointerPredicate, referencePredicate) \
|
| - inline thisType* to##thisType(argumentType* argumentName) { \
|
| - ASSERT_WITH_SECURITY_IMPLICATION(!argumentName || (pointerPredicate)); \
|
| - return static_cast<thisType*>(argumentName); \
|
| - } \
|
| - inline const thisType* to##thisType(const argumentType* argumentName) { \
|
| - ASSERT_WITH_SECURITY_IMPLICATION(!argumentName || (pointerPredicate)); \
|
| - return static_cast<const thisType*>(argumentName); \
|
| - } \
|
| - inline thisType& to##thisType(argumentType& argumentName) { \
|
| - ASSERT_WITH_SECURITY_IMPLICATION(referencePredicate); \
|
| - return static_cast<thisType&>(argumentName); \
|
| - } \
|
| - inline const thisType& to##thisType(const argumentType& argumentName) { \
|
| - ASSERT_WITH_SECURITY_IMPLICATION(referencePredicate); \
|
| - return static_cast<const thisType&>(argumentName); \
|
| - } \
|
| - void to##thisType(const thisType*); \
|
| +// Provide static_cast<> wrappers with SECURITY_DCHECK for bad casts.
|
| +#define DEFINE_TYPE_CASTS(thisType, argumentType, argumentName, \
|
| + pointerPredicate, referencePredicate) \
|
| + inline thisType* to##thisType(argumentType* argumentName) { \
|
| + SECURITY_DCHECK(!argumentName || (pointerPredicate)); \
|
| + return static_cast<thisType*>(argumentName); \
|
| + } \
|
| + inline const thisType* to##thisType(const argumentType* argumentName) { \
|
| + SECURITY_DCHECK(!argumentName || (pointerPredicate)); \
|
| + return static_cast<const thisType*>(argumentName); \
|
| + } \
|
| + inline thisType& to##thisType(argumentType& argumentName) { \
|
| + SECURITY_DCHECK(referencePredicate); \
|
| + return static_cast<thisType&>(argumentName); \
|
| + } \
|
| + inline const thisType& to##thisType(const argumentType& argumentName) { \
|
| + SECURITY_DCHECK(referencePredicate); \
|
| + return static_cast<const thisType&>(argumentName); \
|
| + } \
|
| + void to##thisType(const thisType*); \
|
| void to##thisType(const thisType&)
|
|
|
| #endif // WTF_Assertions_h
|
|
|