Chromium Code Reviews| Index: third_party/WebKit/Source/platform/graphics/ContiguousContainer.cpp |
| diff --git a/third_party/WebKit/Source/platform/graphics/ContiguousContainer.cpp b/third_party/WebKit/Source/platform/graphics/ContiguousContainer.cpp |
| index 3291e45bd3f9d5d839c208af51fb0782a3f7feb1..45848334965822c7b72e04f29a8453695679017a 100644 |
| --- a/third_party/WebKit/Source/platform/graphics/ContiguousContainer.cpp |
| +++ b/third_party/WebKit/Source/platform/graphics/ContiguousContainer.cpp |
| @@ -40,7 +40,7 @@ class ContiguousContainerBase::Buffer { |
| bool isEmpty() const { return usedCapacity() == 0; } |
| void* allocate(size_t objectSize) { |
| - ASSERT(unusedCapacity() >= objectSize); |
| + DCHECK_GE(unusedCapacity(), objectSize); |
| ANNOTATE_CHANGE_SIZE(m_begin, m_capacity, usedCapacity(), |
| usedCapacity() + objectSize); |
| void* result = m_end; |
| @@ -49,7 +49,7 @@ class ContiguousContainerBase::Buffer { |
| } |
| void deallocateLastObject(void* object) { |
| - RELEASE_ASSERT(m_begin <= object && object < m_end); |
| + CHECK(m_begin <= object && object < m_end); |
|
tkent
2017/04/09 23:17:27
Split this into two CHECKs.
Hwanseung Lee
2017/04/11 22:24:10
Done.
|
| ANNOTATE_CHANGE_SIZE(m_begin, m_capacity, usedCapacity(), |
| static_cast<char*>(object) - m_begin); |
| m_end = static_cast<char*>(object); |
| @@ -105,7 +105,7 @@ void ContiguousContainerBase::reserveInitialCapacity(size_t bufferSize, |
| void* ContiguousContainerBase::allocate(size_t objectSize, |
| const char* typeName) { |
| - ASSERT(objectSize <= m_maxObjectSize); |
| + DCHECK_LE(objectSize, m_maxObjectSize); |
| Buffer* bufferForAlloc = nullptr; |
| if (!m_buffers.isEmpty()) { |
| @@ -168,7 +168,7 @@ ContiguousContainerBase::Buffer* |
| ContiguousContainerBase::allocateNewBufferForNextAllocation( |
| size_t bufferSize, |
| const char* typeName) { |
| - ASSERT(m_buffers.isEmpty() || m_endIndex == m_buffers.size() - 1); |
| + DCHECK(m_buffers.isEmpty() || m_endIndex == m_buffers.size() - 1); |
| std::unique_ptr<Buffer> newBuffer = |
| WTF::makeUnique<Buffer>(bufferSize, typeName); |
| Buffer* bufferToReturn = newBuffer.get(); |