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

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: fix 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 f6447dee3911193e5727392949f9c14336ac1549..7780e9ed2ab838a0c5d9035d86da9606b84cb86f 100644
--- a/third_party/WebKit/Source/platform/text/TextBreakIterator.h
+++ b/third_party/WebKit/Source/platform/text/TextBreakIterator.h
@@ -151,7 +151,7 @@ class PLATFORM_EXPORT LazyLineBreakIterator final {
// primary breaking context and using previously stored prior context if
// non-empty.
TextBreakIterator* Get(unsigned prior_context_length) {
- ASSERT(prior_context_length <= kPriorContextCapacity);
+ DCHECK(prior_context_length <= kPriorContextCapacity);
const UChar* prior_context =
prior_context_length
? &prior_context_[kPriorContextCapacity - prior_context_length]
@@ -247,19 +247,19 @@ class PLATFORM_EXPORT NonSharedCharacterBreakIterator final {
void CreateIteratorForBuffer(const UChar*, unsigned length);
unsigned ClusterLengthStartingAt(unsigned offset) const {
- ASSERT(is8_bit_);
+ DCHECK(is8_bit_);
// The only Latin-1 Extended Grapheme Cluster is CR LF
return IsCRBeforeLF(offset) ? 2 : 1;
}
bool IsCRBeforeLF(unsigned offset) const {
- ASSERT(is8_bit_);
+ DCHECK(is8_bit_);
return charaters8_[offset] == '\r' && offset + 1 < length_ &&
charaters8_[offset + 1] == '\n';
}
bool IsLFAfterCR(unsigned offset) const {
- ASSERT(is8_bit_);
+ DCHECK(is8_bit_);
return charaters8_[offset] == '\n' && offset >= 1 &&
charaters8_[offset - 1] == '\r';
}
« no previous file with comments | « third_party/WebKit/Source/platform/text/SuffixTree.h ('k') | third_party/WebKit/Source/platform/text/TextBreakIteratorICU.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698