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

Unified Diff: third_party/WebKit/Source/platform/fonts/shaping/ShapeResultBuffer.cpp

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/ShapeResultBuffer.cpp
diff --git a/third_party/WebKit/Source/platform/fonts/shaping/ShapeResultBuffer.cpp b/third_party/WebKit/Source/platform/fonts/shaping/ShapeResultBuffer.cpp
index 7e4a4da7f1fb2d2478c9eec2d2ddd8c74373b88c..1ea954159ab71ff906d5826c69de592518efc167 100644
--- a/third_party/WebKit/Source/platform/fonts/shaping/ShapeResultBuffer.cpp
+++ b/third_party/WebKit/Source/platform/fonts/shaping/ShapeResultBuffer.cpp
@@ -71,7 +71,7 @@ inline unsigned countGraphemesInCluster(const UChar* str,
endIndex = tempIndex;
}
uint16_t length = endIndex - startIndex;
- ASSERT(static_cast<unsigned>(startIndex + length) <= strLength);
+ DCHECK_LE(static_cast<unsigned>(startIndex + length), strLength);
TextBreakIterator* cursorPosIterator =
cursorMovementIterator(&str[startIndex], length);
@@ -464,7 +464,7 @@ int ShapeResultBuffer::offsetForPosition(const TextRun& run,
continue;
int offsetForWord =
wordResult->offsetForPosition(targetX, includePartialGlyphs);
- ASSERT(offsetForWord >= 0);
+ DCHECK_GE(offsetForWord, 0);
totalOffset += offsetForWord;
if (targetX >= 0 && targetX <= wordResult->width())
return totalOffset;

Powered by Google App Engine
This is Rietveld 408576698