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

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

Issue 2811453002: Replace ASSERT, ASSERT_NOT_REACHED, and RELEASE_ASSERT in platform/text (Closed)
Patch Set: Replace ASSERT, ASSERT_NOT_REACHED, and RELEASE_ASSERT in platform/text 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/text/LocaleICU.cpp
diff --git a/third_party/WebKit/Source/platform/text/LocaleICU.cpp b/third_party/WebKit/Source/platform/text/LocaleICU.cpp
index 5a471cf46d308c02c27559c383208b139410c824..2492be1499f287c4c0d2e31cfed7b34c78b99121 100644
--- a/third_party/WebKit/Source/platform/text/LocaleICU.cpp
+++ b/third_party/WebKit/Source/platform/text/LocaleICU.cpp
@@ -73,7 +73,7 @@ std::unique_ptr<LocaleICU> LocaleICU::create(const char* localeString) {
String LocaleICU::decimalSymbol(UNumberFormatSymbol symbol) {
UErrorCode status = U_ZERO_ERROR;
int32_t bufferLength = unum_getSymbol(m_numberFormat, symbol, 0, 0, &status);
- ASSERT(U_SUCCESS(status) || status == U_BUFFER_OVERFLOW_ERROR);
+ DCHECK(U_SUCCESS(status) || status == U_BUFFER_OVERFLOW_ERROR);
if (U_FAILURE(status) && status != U_BUFFER_OVERFLOW_ERROR)
return String();
StringBuffer<UChar> buffer(bufferLength);
@@ -89,14 +89,14 @@ String LocaleICU::decimalTextAttribute(UNumberFormatTextAttribute tag) {
UErrorCode status = U_ZERO_ERROR;
int32_t bufferLength =
unum_getTextAttribute(m_numberFormat, tag, 0, 0, &status);
- ASSERT(U_SUCCESS(status) || status == U_BUFFER_OVERFLOW_ERROR);
+ DCHECK(U_SUCCESS(status) || status == U_BUFFER_OVERFLOW_ERROR);
if (U_FAILURE(status) && status != U_BUFFER_OVERFLOW_ERROR)
return String();
StringBuffer<UChar> buffer(bufferLength);
status = U_ZERO_ERROR;
unum_getTextAttribute(m_numberFormat, tag, buffer.characters(), bufferLength,
&status);
- ASSERT(U_SUCCESS(status));
+ DCHECK(U_SUCCESS(status));
if (U_FAILURE(status))
return String();
return String::adopt(buffer);
@@ -124,7 +124,7 @@ void LocaleICU::initializeLocaleData() {
symbols.push_back(decimalSymbol(UNUM_NINE_DIGIT_SYMBOL));
symbols.push_back(decimalSymbol(UNUM_DECIMAL_SEPARATOR_SYMBOL));
symbols.push_back(decimalSymbol(UNUM_GROUPING_SEPARATOR_SYMBOL));
- ASSERT(symbols.size() == DecimalSymbolsSize);
+ DCHECK_EQ(symbols.size(), DecimalSymbolsSize);
setLocaleData(symbols, decimalTextAttribute(UNUM_POSITIVE_PREFIX),
decimalTextAttribute(UNUM_POSITIVE_SUFFIX),
decimalTextAttribute(UNUM_NEGATIVE_PREFIX),
@@ -160,7 +160,7 @@ UDateFormat* LocaleICU::openDateFormatForStandAloneMonthLabels(
udat_open(UDAT_PATTERN, UDAT_PATTERN, m_locale.data(), 0, -1,
monthPattern, isShort ? 3 : 4, &status);
udat_setContext(formatter, UDISPCTX_CAPITALIZATION_FOR_STANDALONE, &status);
- ASSERT(U_SUCCESS(status));
+ DCHECK(U_SUCCESS(status));
return formatter;
}

Powered by Google App Engine
This is Rietveld 408576698