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

Unified Diff: third_party/WebKit/Source/platform/text/TextBreakIterator.h

Issue 2811453002: Replace ASSERT, ASSERT_NOT_REACHED, and RELEASE_ASSERT in platform/text (Closed)
Patch Set: Replace ASSERT, ASSERT_NOT_REACHED, and RELEASE_ASSERT in platform/text 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/text/TextBreakIterator.h
diff --git a/third_party/WebKit/Source/platform/text/TextBreakIterator.h b/third_party/WebKit/Source/platform/text/TextBreakIterator.h
index 1e1718173f7b1ffd7195966f423aa4222f147141..16fd60dc27b65bcb7024b1958cc14c1653871a5f 100644
--- a/third_party/WebKit/Source/platform/text/TextBreakIterator.h
+++ b/third_party/WebKit/Source/platform/text/TextBreakIterator.h
@@ -149,7 +149,7 @@ class PLATFORM_EXPORT LazyLineBreakIterator final {
// primary breaking context and using previously stored prior context if
// non-empty.
TextBreakIterator* get(unsigned priorContextLength) {
- ASSERT(priorContextLength <= priorContextCapacity);
+ DCHECK(priorContextLength <= priorContextCapacity);
tkent 2017/04/09 23:07:01 Use DCHECK_LE if it doesn't cause a compile failur
Hwanseung Lee 2017/04/11 03:29:38 it was cause compile failure.
const UChar* priorContext =
priorContextLength
? &m_priorContext[priorContextCapacity - priorContextLength]
@@ -244,19 +244,19 @@ class PLATFORM_EXPORT NonSharedCharacterBreakIterator final {
void createIteratorForBuffer(const UChar*, unsigned length);
unsigned clusterLengthStartingAt(unsigned offset) const {
- ASSERT(m_is8Bit);
+ DCHECK(m_is8Bit);
// The only Latin-1 Extended Grapheme Cluster is CR LF
return isCRBeforeLF(offset) ? 2 : 1;
}
bool isCRBeforeLF(unsigned offset) const {
- ASSERT(m_is8Bit);
+ DCHECK(m_is8Bit);
return m_charaters8[offset] == '\r' && offset + 1 < m_length &&
m_charaters8[offset + 1] == '\n';
}
bool isLFAfterCR(unsigned offset) const {
- ASSERT(m_is8Bit);
+ DCHECK(m_is8Bit);
return m_charaters8[offset] == '\n' && offset >= 1 &&
m_charaters8[offset - 1] == '\r';
}

Powered by Google App Engine
This is Rietveld 408576698