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

Unified Diff: third_party/WebKit/Source/wtf/text/StringImpl.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/text/StringHash.h ('k') | third_party/WebKit/Source/wtf/text/StringImpl.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/wtf/text/StringImpl.h
diff --git a/third_party/WebKit/Source/wtf/text/StringImpl.h b/third_party/WebKit/Source/wtf/text/StringImpl.h
index 394033874017541a94a96406b2d171769cc1f4f4..98e639bfec83fd266fefba4153693de33393edc8 100644
--- a/third_party/WebKit/Source/wtf/text/StringImpl.h
+++ b/third_party/WebKit/Source/wtf/text/StringImpl.h
@@ -165,7 +165,7 @@ class WTF_EXPORT StringImpl {
m_isAtomic(false),
m_is8Bit(true),
m_isStatic(false) {
- ASSERT(m_length);
+ DCHECK(m_length);
STRING_STATS_ADD_8BIT_STRING(m_length);
}
@@ -176,7 +176,7 @@ class WTF_EXPORT StringImpl {
m_isAtomic(false),
m_is8Bit(false),
m_isStatic(false) {
- ASSERT(m_length);
+ DCHECK(m_length);
STRING_STATS_ADD_16BIT_STRING(m_length);
}
@@ -230,11 +230,11 @@ class WTF_EXPORT StringImpl {
bool is8Bit() const { return m_is8Bit; }
ALWAYS_INLINE const LChar* characters8() const {
- ASSERT(is8Bit());
+ DCHECK(is8Bit());
return reinterpret_cast<const LChar*>(this + 1);
}
ALWAYS_INLINE const UChar* characters16() const {
- ASSERT(!is8Bit());
+ DCHECK(!is8Bit());
return reinterpret_cast<const UChar*>(this + 1);
}
ALWAYS_INLINE const void* bytes() const {
@@ -486,11 +486,11 @@ class WTF_EXPORT StringImpl {
static unsigned m_highestStaticStringLength;
-#if ENABLE(ASSERT)
+#if DCHECK_IS_ON()
void assertHashIsCorrect() {
- ASSERT(hasHash());
- ASSERT(existingHash() ==
- StringHasher::computeHashAndMaskTop8Bits(characters8(), length()));
+ DCHECK(hasHash());
+ DCHECK_EQ(existingHash(), StringHasher::computeHashAndMaskTop8Bits(
+ characters8(), length()));
}
#endif
« no previous file with comments | « third_party/WebKit/Source/wtf/text/StringHash.h ('k') | third_party/WebKit/Source/wtf/text/StringImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698