Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(639)

Unified Diff: third_party/WebKit/Source/wtf/Assertions.h

Issue 2458003002: Remove ASSERT_WITH_SECURITY_IMPLICATION. (Closed)
Patch Set: Minor formatting fix Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp ('k') | third_party/WebKit/Source/wtf/BitVector.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp ('k') | third_party/WebKit/Source/wtf/BitVector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698