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

Unified Diff: third_party/WebKit/Source/platform/fonts/shaping/CachingWordShapeIterator.h

Issue 2807913002: Replace ASSERT, ASSERT_NOT_REACHED, and RELEASE_ASSERT in platform/fonts (Closed)
Patch Set: rebase 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/fonts/shaping/CachingWordShapeIterator.h
diff --git a/third_party/WebKit/Source/platform/fonts/shaping/CachingWordShapeIterator.h b/third_party/WebKit/Source/platform/fonts/shaping/CachingWordShapeIterator.h
index ecdbd0d3291e9f6a197a7bbc7678e398037f2f64..ec78526033c7a4fdae3d16ea685fcdfad268b76f 100644
--- a/third_party/WebKit/Source/platform/fonts/shaping/CachingWordShapeIterator.h
+++ b/third_party/WebKit/Source/platform/fonts/shaping/CachingWordShapeIterator.h
@@ -50,7 +50,7 @@ class PLATFORM_EXPORT CachingWordShapeIterator final {
spacing_(run, font->GetFontDescription()),
width_so_far_(0),
start_index_(0) {
- ASSERT(font);
+ DCHECK(font);
// Shaping word by word is faster as each word is cached. If we cannot
// use the cache or if the font doesn't support word by word shaping
@@ -155,7 +155,7 @@ class PLATFORM_EXPORT CachingWordShapeIterator final {
if (!start_index_ && end_index == length) {
*result = ShapeWord(text_run_, font_);
} else {
- ASSERT(end_index <= length);
+ DCHECK_LE(end_index, length);
TextRun sub_run =
text_run_.SubRun(start_index_, end_index - start_index_);
*result = ShapeWord(sub_run, font_);
@@ -166,7 +166,7 @@ class PLATFORM_EXPORT CachingWordShapeIterator final {
unsigned EndIndexUntil(UChar ch) const {
unsigned length = text_run_.length();
- ASSERT(start_index_ < length);
+ DCHECK_LT(start_index_, length);
for (unsigned i = start_index_ + 1;; i++) {
if (i == length || text_run_[i] == ch)
return i;
@@ -194,7 +194,7 @@ class PLATFORM_EXPORT CachingWordShapeIterator final {
if (!NextWord(word_result))
return false;
}
- ASSERT(*word_result);
+ DCHECK(*word_result);
width_so_far_ += (*word_result)->Width();
return true;
}

Powered by Google App Engine
This is Rietveld 408576698