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

Unified Diff: third_party/WebKit/Source/core/editing/iterators/BackwardsTextBuffer.cpp

Issue 1878473002: ASSERT -> DCHECK in core/editing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Output info for some DCHECKs, add TODOs. Created 4 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/core/editing/iterators/BackwardsTextBuffer.cpp
diff --git a/third_party/WebKit/Source/core/editing/iterators/BackwardsTextBuffer.cpp b/third_party/WebKit/Source/core/editing/iterators/BackwardsTextBuffer.cpp
index 9d3cc06c2938363c081e92719f289e76593852d8..3eaec0841698aefc19db7108323e6c4a0b13d928 100644
--- a/third_party/WebKit/Source/core/editing/iterators/BackwardsTextBuffer.cpp
+++ b/third_party/WebKit/Source/core/editing/iterators/BackwardsTextBuffer.cpp
@@ -13,14 +13,14 @@ const UChar* BackwardsTextBuffer::data() const
UChar* BackwardsTextBuffer::calcDestination(size_t length)
{
- ASSERT(size() + length <= capacity());
+ DCHECK_LE(size() + length, capacity());
return bufferEnd() - size() - length;
}
void BackwardsTextBuffer::shiftData(size_t oldCapacity)
{
- ASSERT(oldCapacity <= capacity());
- ASSERT(size() <= oldCapacity);
+ DCHECK_LE(oldCapacity, capacity());
+ DCHECK_LE(size(), oldCapacity);
std::copy_backward(bufferBegin() + oldCapacity - size(), bufferBegin() + oldCapacity, bufferEnd());
}

Powered by Google App Engine
This is Rietveld 408576698