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

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: 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/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 b7ffc7c55f21aca012f68be234a86271b9722e20..dd2f90e7bc5c9e9a8bc5adae4b2a183e24ad07fd 100644
--- a/third_party/WebKit/Source/platform/fonts/shaping/ShapeResultBuffer.cpp
+++ b/third_party/WebKit/Source/platform/fonts/shaping/ShapeResultBuffer.cpp
@@ -73,7 +73,7 @@ inline unsigned CountGraphemesInCluster(const UChar* str,
end_index = temp_index;
}
uint16_t length = end_index - start_index;
- ASSERT(static_cast<unsigned>(start_index + length) <= str_length);
+ DCHECK_LE(static_cast<unsigned>(start_index + length), str_length);
TextBreakIterator* cursor_pos_iterator =
CursorMovementIterator(&str[start_index], length);
@@ -468,7 +468,7 @@ int ShapeResultBuffer::OffsetForPosition(const TextRun& run,
continue;
int offset_for_word =
word_result->OffsetForPosition(target_x, include_partial_glyphs);
- ASSERT(offset_for_word >= 0);
+ DCHECK_GE(offset_for_word, 0);
total_offset += offset_for_word;
if (target_x >= 0 && target_x <= word_result->Width())
return total_offset;

Powered by Google App Engine
This is Rietveld 408576698