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

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

Issue 2833123002: Replace ASSERT_NOT_REACHED, and RELEASE_ASSERT in platform/wtf (Closed)
Patch Set: wtf Created 3 years, 8 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/platform/wtf/Deque.h
diff --git a/third_party/WebKit/Source/platform/wtf/Deque.h b/third_party/WebKit/Source/platform/wtf/Deque.h
index bc3e2358ed66df9f06aca0413a80cad74140d114..d6e3fbc2b6700fa3e929dc57ac9b95f6a6b6c798 100644
--- a/third_party/WebKit/Source/platform/wtf/Deque.h
+++ b/third_party/WebKit/Source/platform/wtf/Deque.h
@@ -109,13 +109,13 @@ class Deque : public ConditionalDestructor<Deque<T, INLINE_CAPACITY, Allocator>,
T TakeLast();
T& at(size_t i) {
- RELEASE_ASSERT(i < size());
+ CHECK_LT(i, size());
size_t right = buffer_.capacity() - start_;
return i < right ? buffer_.Buffer()[start_ + i]
: buffer_.Buffer()[i - right];
}
const T& at(size_t i) const {
- RELEASE_ASSERT(i < size());
+ CHECK_LT(i, size());
size_t right = buffer_.capacity() - start_;
return i < right ? buffer_.Buffer()[start_ + i]
: buffer_.Buffer()[i - right];
@@ -647,13 +647,13 @@ 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(index_ != deque_->end_);
+ CHECK_NE(index_, deque_->end_);
return &deque_->buffer_.Buffer()[index_];
}
template <typename T, size_t inlineCapacity, typename Allocator>
inline T* DequeIteratorBase<T, inlineCapacity, Allocator>::Before() const {
- RELEASE_ASSERT(index_ != deque_->start_);
+ CHECK_NE(index_, deque_->start_);
if (!index_)
return &deque_->buffer_.buffer()[deque_->buffer_.capacity() - 1];
return &deque_->buffer_.buffer()[index_ - 1];
« no previous file with comments | « third_party/WebKit/Source/platform/wtf/AssertionsTest.cpp ('k') | third_party/WebKit/Source/platform/wtf/HashTable.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698