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

Unified Diff: third_party/WebKit/Source/wtf/BloomFilter.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/BitVector.cpp ('k') | third_party/WebKit/Source/wtf/DateMath.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/wtf/BloomFilter.h
diff --git a/third_party/WebKit/Source/wtf/BloomFilter.h b/third_party/WebKit/Source/wtf/BloomFilter.h
index 131f92ba9e72b0ec308827c7e2b0ee5d9a5d4212..4618304cfb8b56115d5f43321dfc5e2af7bcfc30 100644
--- a/third_party/WebKit/Source/wtf/BloomFilter.h
+++ b/third_party/WebKit/Source/wtf/BloomFilter.h
@@ -75,7 +75,7 @@ class BloomFilter {
return mayContain(string.impl()->hash());
}
-#if ENABLE(ASSERT)
+#if DCHECK_IS_ON()
// Slow.
bool likelyEmpty() const;
bool isClear() const;
@@ -108,8 +108,8 @@ template <unsigned keyBits>
inline void BloomFilter<keyBits>::remove(unsigned hash) {
uint8_t& first = firstSlot(hash);
uint8_t& second = secondSlot(hash);
- ASSERT(first);
- ASSERT(second);
+ DCHECK(first);
+ DCHECK(second);
// In case of an overflow, the slot sticks in the table until clear().
if (LIKELY(first < maximumCount()))
--first;
@@ -122,7 +122,7 @@ inline void BloomFilter<keyBits>::clear() {
memset(m_table, 0, tableSize);
}
-#if ENABLE(ASSERT)
+#if DCHECK_IS_ON()
template <unsigned keyBits>
bool BloomFilter<keyBits>::likelyEmpty() const {
for (size_t n = 0; n < tableSize; ++n) {
« no previous file with comments | « third_party/WebKit/Source/wtf/BitVector.cpp ('k') | third_party/WebKit/Source/wtf/DateMath.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698