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

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

Issue 2585673002: Replace ASSERT, ENABLE(ASSERT), and ASSERT_NOT_REACHED in wtf (Closed)
Patch Set: Fix an Asan issue with LinkedHashSetNodeBase::unlink Created 4 years 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/wtf/SizeLimits.cpp ('k') | third_party/WebKit/Source/wtf/StringHasher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/wtf/StdLibExtras.h
diff --git a/third_party/WebKit/Source/wtf/StdLibExtras.h b/third_party/WebKit/Source/wtf/StdLibExtras.h
index 454e1a18904d7a4b03dead930d3ca2dc026a59f7..4a9ca69300d543541bd90d6f6a35d359bd29e9b8 100644
--- a/third_party/WebKit/Source/wtf/StdLibExtras.h
+++ b/third_party/WebKit/Source/wtf/StdLibExtras.h
@@ -80,12 +80,12 @@ class StaticLocalWrapper<T, true> {
using WrapType = blink::Persistent<T>;
static T& unwrap(blink::Persistent<T>* singleton) {
- ASSERT(singleton);
+ DCHECK(singleton);
// If this assert triggers, you're supplying an empty ("()") 'Arguments'
// argument to DEFINE_STATIC_LOCAL() - it must be the heap object you wish
// to create as a static singleton and wrapped up with a Persistent
// reference.
- ASSERT(*singleton);
+ DCHECK(*singleton);
return **singleton;
}
};
@@ -93,7 +93,7 @@ class StaticLocalWrapper<T, true> {
#if DCHECK_IS_ON()
#define DEFINE_STATIC_LOCAL_CHECK_THREADSAFE_ACCESS(Name) \
static StaticLocalVerifier Name##StaticLocalVerifier; \
- ASSERT(Name##StaticLocalVerifier.isNotRacy())
+ DCHECK(Name##StaticLocalVerifier.isNotRacy())
#else
#define DEFINE_STATIC_LOCAL_CHECK_THREADSAFE_ACCESS(Name)
#endif
@@ -145,13 +145,13 @@ bool isPointerTypeAlignmentOkay(Type* ptr) {
template <typename TypePtr>
TypePtr reinterpret_cast_ptr(void* ptr) {
- ASSERT(isPointerTypeAlignmentOkay(reinterpret_cast<TypePtr>(ptr)));
+ DCHECK(isPointerTypeAlignmentOkay(reinterpret_cast<TypePtr>(ptr)));
return reinterpret_cast<TypePtr>(ptr);
}
template <typename TypePtr>
TypePtr reinterpret_cast_ptr(const void* ptr) {
- ASSERT(isPointerTypeAlignmentOkay(reinterpret_cast<TypePtr>(ptr)));
+ DCHECK(isPointerTypeAlignmentOkay(reinterpret_cast<TypePtr>(ptr)));
return reinterpret_cast<TypePtr>(ptr);
}
#else
@@ -237,7 +237,7 @@ char (&ArrayLengthHelperFunction(T (&)[0]))[0];
// This version of placement new omits a 0 check.
enum NotNullTag { NotNull };
inline void* operator new(size_t, NotNullTag, void* location) {
- ASSERT(location);
+ DCHECK(location);
return location;
}
« no previous file with comments | « third_party/WebKit/Source/wtf/SizeLimits.cpp ('k') | third_party/WebKit/Source/wtf/StringHasher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698