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

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

Issue 1992873004: Replace all occurrences of RELEASE_ASSERT in wtf with CHECK. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Specialized dchecks in utils.h. Created 4 years, 7 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
Index: third_party/WebKit/Source/wtf/Deque.h
diff --git a/third_party/WebKit/Source/wtf/Deque.h b/third_party/WebKit/Source/wtf/Deque.h
index eba8660706cac430d3c5b9e1193624561e13a5a3..f0eda46e7c9d90c3d177e5bfe467438bb7c4e9fc 100644
--- a/third_party/WebKit/Source/wtf/Deque.h
+++ b/third_party/WebKit/Source/wtf/Deque.h
@@ -84,13 +84,13 @@ public:
T& at(size_t i)
{
- RELEASE_ASSERT(i < size());
+ CHECK_LT(i, size());
size_t right = m_buffer.capacity() - m_start;
return i < right ? m_buffer.buffer()[m_start + i] : m_buffer.buffer()[i - right];
}
const T& at(size_t i) const
{
- RELEASE_ASSERT(i < size());
+ CHECK_LT(i, size());
size_t right = m_buffer.capacity() - m_start;
return i < right ? m_buffer.buffer()[m_start + i] : m_buffer.buffer()[i - right];
}
@@ -574,14 +574,14 @@ inline void DequeIteratorBase<T, inlineCapacity, Allocator>::decrement()
template <typename T, size_t inlineCapacity, typename Allocator>
inline T* DequeIteratorBase<T, inlineCapacity, Allocator>::after() const
{
- RELEASE_ASSERT(m_index != m_deque->m_end);
+ CHECK_NE(m_index, m_deque->m_end);
return &m_deque->m_buffer.buffer()[m_index];
}
template <typename T, size_t inlineCapacity, typename Allocator>
inline T* DequeIteratorBase<T, inlineCapacity, Allocator>::before() const
{
- RELEASE_ASSERT(m_index != m_deque->m_start);
+ CHECK_NE(m_index, m_deque->m_start);
if (!m_index)
return &m_deque->m_buffer.buffer()[m_deque->m_buffer.capacity() - 1];
return &m_deque->m_buffer.buffer()[m_index - 1];
« no previous file with comments | « no previous file | third_party/WebKit/Source/wtf/Functional.h » ('j') | third_party/WebKit/Source/wtf/dtoa/utils.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698