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

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: Replace ASSERT, ASSERT_NOT_REACHED, and RELEASE_ASSERT in platform/fonts 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 60b2afdd93a75faab7ce078569bde42068ca7157..24a770a6b9c96846eab416e1be1df423f8592da5 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 {
m_spacing(run, font->getFontDescription()),
m_widthSoFar(0),
m_startIndex(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 (!m_startIndex && endIndex == length) {
*result = shapeWord(m_textRun, m_font);
} else {
- ASSERT(endIndex <= length);
+ DCHECK_LE(endIndex, length);
TextRun subRun = m_textRun.subRun(m_startIndex, endIndex - m_startIndex);
*result = shapeWord(subRun, m_font);
}
@@ -165,7 +165,7 @@ class PLATFORM_EXPORT CachingWordShapeIterator final {
unsigned endIndexUntil(UChar ch) const {
unsigned length = m_textRun.length();
- ASSERT(m_startIndex < length);
+ DCHECK_LT(m_startIndex, length);
for (unsigned i = m_startIndex + 1;; i++) {
if (i == length || m_textRun[i] == ch)
return i;
@@ -193,7 +193,7 @@ class PLATFORM_EXPORT CachingWordShapeIterator final {
if (!nextWord(wordResult))
return false;
}
- ASSERT(*wordResult);
+ DCHECK(*wordResult);
m_widthSoFar += (*wordResult)->width();
return true;
}

Powered by Google App Engine
This is Rietveld 408576698