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

Unified Diff: third_party/WebKit/Source/wtf/typed_arrays/ArrayBufferBuilder.cpp

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
Index: third_party/WebKit/Source/wtf/typed_arrays/ArrayBufferBuilder.cpp
diff --git a/third_party/WebKit/Source/wtf/typed_arrays/ArrayBufferBuilder.cpp b/third_party/WebKit/Source/wtf/typed_arrays/ArrayBufferBuilder.cpp
index 729717dad6509163cebfa487a2fa514032df8c2f..9266cb909f13c0f316e46ae6abfe4ef629e2efe6 100644
--- a/third_party/WebKit/Source/wtf/typed_arrays/ArrayBufferBuilder.cpp
+++ b/third_party/WebKit/Source/wtf/typed_arrays/ArrayBufferBuilder.cpp
@@ -71,11 +71,11 @@ bool ArrayBufferBuilder::expandCapacity(unsigned sizeToIncrease) {
}
unsigned ArrayBufferBuilder::append(const char* data, unsigned length) {
- ASSERT(length > 0);
+ DCHECK_GT(length, 0u);
unsigned currentBufferSize = m_buffer->byteLength();
- ASSERT(m_bytesUsed <= currentBufferSize);
+ DCHECK_LE(m_bytesUsed, currentBufferSize);
unsigned remainingBufferSpace = currentBufferSize - m_bytesUsed;
@@ -109,7 +109,7 @@ String ArrayBufferBuilder::toString() {
}
void ArrayBufferBuilder::shrinkToFit() {
- ASSERT(m_bytesUsed <= m_buffer->byteLength());
+ DCHECK_LE(m_bytesUsed, m_buffer->byteLength());
if (m_buffer->byteLength() > m_bytesUsed)
m_buffer = m_buffer->slice(0, m_bytesUsed);

Powered by Google App Engine
This is Rietveld 408576698