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

Unified Diff: third_party/WebKit/Source/platform/text/SegmentedString.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/SegmentedString.h
diff --git a/third_party/WebKit/Source/platform/text/SegmentedString.h b/third_party/WebKit/Source/platform/text/SegmentedString.h
index 436453728be5a424a17d74b68ee6939074e4b8be..5b4c405159d4752fa4e5d3004869789026e4f3e7 100644
--- a/third_party/WebKit/Source/platform/text/SegmentedString.h
+++ b/third_party/WebKit/Source/platform/text/SegmentedString.h
@@ -118,12 +118,12 @@ class PLATFORM_EXPORT SegmentedSubstring {
}
UChar IncrementAndGetCurrentChar8() {
- ASSERT(data_.string8_ptr);
+ DCHECK(data_.string8_ptr);
return *++data_.string8_ptr;
}
UChar IncrementAndGetCurrentChar16() {
- ASSERT(data_.string16_ptr);
+ DCHECK(data_.string16_ptr);
return *++data_.string16_ptr;
}
@@ -133,14 +133,14 @@ class PLATFORM_EXPORT SegmentedSubstring {
}
ALWAYS_INLINE UChar GetCurrentChar() {
- ASSERT(length_);
+ DCHECK(length_);
if (Is8Bit())
return GetCurrentChar8();
return GetCurrentChar16();
}
ALWAYS_INLINE UChar IncrementAndGetCurrentChar() {
- ASSERT(length_);
+ DCHECK(length_);
if (Is8Bit())
return IncrementAndGetCurrentChar8();
return IncrementAndGetCurrentChar16();
@@ -270,12 +270,12 @@ class PLATFORM_EXPORT SegmentedString {
}
void AdvancePastNonNewline() {
- ASSERT(CurrentChar() != '\n');
+ DCHECK_NE(CurrentChar(), '\n');
Advance();
}
void AdvancePastNewlineAndUpdateLineNumber() {
- ASSERT(CurrentChar() == '\n');
+ DCHECK_EQ(CurrentChar(), '\n');
if (current_string_.length() > 1) {
int new_line_flag = current_string_.DoNotExcludeLineNumbers();
current_line_ += new_line_flag;
@@ -336,7 +336,7 @@ class PLATFORM_EXPORT SegmentedString {
void UpdateSlowCaseFunctionPointers();
void DecrementAndCheckLength() {
- ASSERT(current_string_.length() > 1);
+ DCHECK_GT(current_string_.length(), 1);
current_string_.DecrementLength();
if (current_string_.HaveOneCharacterLeft())
UpdateSlowCaseFunctionPointers();

Powered by Google App Engine
This is Rietveld 408576698