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

Unified Diff: third_party/WebKit/Source/wtf/DoublyLinkedList.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/Deque.h ('k') | third_party/WebKit/Source/wtf/HashCountedSet.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/wtf/DoublyLinkedList.h
diff --git a/third_party/WebKit/Source/wtf/DoublyLinkedList.h b/third_party/WebKit/Source/wtf/DoublyLinkedList.h
index 14cd2187a49d1c078ebac7ba7e9604f6a2710639..16e0d41125f0ebb8e89593b47f37f4e433d64d88 100644
--- a/third_party/WebKit/Source/wtf/DoublyLinkedList.h
+++ b/third_party/WebKit/Source/wtf/DoublyLinkedList.h
@@ -129,7 +129,7 @@ inline T* DoublyLinkedList<T>::tail() const {
template <typename T>
inline void DoublyLinkedList<T>::push(T* node) {
if (!m_head) {
- ASSERT(!m_tail);
+ DCHECK(!m_tail);
m_head = node;
m_tail = node;
node->setPrev(0);
@@ -137,7 +137,7 @@ inline void DoublyLinkedList<T>::push(T* node) {
return;
}
- ASSERT(m_tail);
+ DCHECK(m_tail);
m_head->setPrev(node);
node->setNext(m_head);
node->setPrev(0);
@@ -147,7 +147,7 @@ inline void DoublyLinkedList<T>::push(T* node) {
template <typename T>
inline void DoublyLinkedList<T>::append(T* node) {
if (!m_tail) {
- ASSERT(!m_head);
+ DCHECK(!m_head);
m_head = node;
m_tail = node;
node->setPrev(0);
@@ -155,7 +155,7 @@ inline void DoublyLinkedList<T>::append(T* node) {
return;
}
- ASSERT(m_head);
+ DCHECK(m_head);
m_tail->setNext(node);
node->setPrev(m_tail);
node->setNext(0);
@@ -165,18 +165,18 @@ inline void DoublyLinkedList<T>::append(T* node) {
template <typename T>
inline void DoublyLinkedList<T>::remove(T* node) {
if (node->prev()) {
- ASSERT(node != m_head);
+ DCHECK_NE(node, m_head);
node->prev()->setNext(node->next());
} else {
- ASSERT(node == m_head);
+ DCHECK_EQ(node, m_head);
m_head = node->next();
}
if (node->next()) {
- ASSERT(node != m_tail);
+ DCHECK_NE(node, m_tail);
node->next()->setPrev(node->prev());
} else {
- ASSERT(node == m_tail);
+ DCHECK_EQ(node, m_tail);
m_tail = node->prev();
}
}
« no previous file with comments | « third_party/WebKit/Source/wtf/Deque.h ('k') | third_party/WebKit/Source/wtf/HashCountedSet.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698