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

Unified Diff: third_party/WebKit/Source/platform/text/UnicodeUtilities.cpp

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
« no previous file with comments | « third_party/WebKit/Source/platform/text/TextRun.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/text/UnicodeUtilities.cpp
diff --git a/third_party/WebKit/Source/platform/text/UnicodeUtilities.cpp b/third_party/WebKit/Source/platform/text/UnicodeUtilities.cpp
index d984be236f2990605383812b771953801fb63a2b..4291cb77fa5a6dac58efe9c807bf7053a69fcd46 100644
--- a/third_party/WebKit/Source/platform/text/UnicodeUtilities.cpp
+++ b/third_party/WebKit/Source/platform/text/UnicodeUtilities.cpp
@@ -151,7 +151,7 @@ bool IsKanaLetter(UChar character) {
}
bool IsSmallKanaLetter(UChar character) {
- ASSERT(IsKanaLetter(character));
+ DCHECK(IsKanaLetter(character));
switch (character) {
case 0x3041: // HIRAGANA LETTER SMALL A
@@ -209,7 +209,7 @@ bool IsSmallKanaLetter(UChar character) {
}
static inline VoicedSoundMarkType ComposedVoicedSoundMark(UChar character) {
- ASSERT(IsKanaLetter(character));
+ DCHECK(IsKanaLetter(character));
switch (character) {
case 0x304C: // HIRAGANA LETTER GA
@@ -295,16 +295,16 @@ bool ContainsKanaLetters(const String& pattern) {
void NormalizeCharactersIntoNFCForm(const UChar* characters,
unsigned length,
Vector<UChar>& buffer) {
- ASSERT(length);
+ DCHECK(length);
buffer.Resize(length);
UErrorCode status = U_ZERO_ERROR;
size_t buffer_size = unorm_normalize(characters, length, UNORM_NFC, 0,
buffer.Data(), length, &status);
- ASSERT(status == U_ZERO_ERROR || status == U_STRING_NOT_TERMINATED_WARNING ||
+ DCHECK(status == U_ZERO_ERROR || status == U_STRING_NOT_TERMINATED_WARNING ||
status == U_BUFFER_OVERFLOW_ERROR);
- ASSERT(buffer_size);
+ DCHECK(buffer_size);
buffer.Resize(buffer_size);
@@ -314,7 +314,7 @@ void NormalizeCharactersIntoNFCForm(const UChar* characters,
status = U_ZERO_ERROR;
unorm_normalize(characters, length, UNORM_NFC, 0, buffer.Data(), buffer_size,
&status);
- ASSERT(status == U_STRING_NOT_TERMINATED_WARNING);
+ DCHECK_EQ(status, U_STRING_NOT_TERMINATED_WARNING);
}
// This function returns kNotFound if |first| and |second| contain different
« no previous file with comments | « third_party/WebKit/Source/platform/text/TextRun.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698