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

Unified Diff: third_party/WebKit/Source/platform/text/PlatformLocale.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/PlatformLocale.cpp
diff --git a/third_party/WebKit/Source/platform/text/PlatformLocale.cpp b/third_party/WebKit/Source/platform/text/PlatformLocale.cpp
index 8551e1016137c3e5bb142dd91dcb37ac0088e4bd..009486ba11992a7c81f76a28df7cc18dbd39f7db 100644
--- a/third_party/WebKit/Source/platform/text/PlatformLocale.cpp
+++ b/third_party/WebKit/Source/platform/text/PlatformLocale.cpp
@@ -167,7 +167,7 @@ void DateTimeStringBuilder::visitField(DateTimeFormat::FieldType fieldType,
}
void DateTimeStringBuilder::visitLiteral(const String& text) {
- ASSERT(text.length());
+ DCHECK(text.length());
m_builder.append(text);
}
@@ -177,7 +177,7 @@ String DateTimeStringBuilder::toString() {
Locale& Locale::defaultLocale() {
static Locale* locale = Locale::create(defaultLanguage()).release();
- ASSERT(isMainThread());
+ DCHECK(isMainThread());
return *locale;
}
@@ -250,14 +250,14 @@ void Locale::setLocaleData(const Vector<String, DecimalSymbolsSize>& symbols,
const String& negativePrefix,
const String& negativeSuffix) {
for (size_t i = 0; i < symbols.size(); ++i) {
- ASSERT(!symbols[i].isEmpty());
+ DCHECK(!symbols[i].isEmpty());
m_decimalSymbols[i] = symbols[i];
}
m_positivePrefix = positivePrefix;
m_positiveSuffix = positiveSuffix;
m_negativePrefix = negativePrefix;
m_negativeSuffix = negativeSuffix;
- ASSERT(!m_positivePrefix.isEmpty() || !m_positiveSuffix.isEmpty() ||
+ DCHECK(!m_positivePrefix.isEmpty() || !m_positiveSuffix.isEmpty() ||
!m_negativePrefix.isEmpty() || !m_negativeSuffix.isEmpty());
m_hasLocaleData = true;
@@ -310,7 +310,7 @@ String Locale::convertToLocalizedNumber(const String& input) {
builder.append(m_decimalSymbols[DecimalSeparatorIndex]);
break;
default:
- ASSERT_NOT_REACHED();
+ NOTREACHED();
}
}
@@ -465,7 +465,7 @@ String Locale::formatDateTime(const DateComponents& date,
: dateTimeFormatWithSeconds());
break;
case DateComponents::Invalid:
- ASSERT_NOT_REACHED();
+ NOTREACHED();
break;
}
return builder.toString();

Powered by Google App Engine
This is Rietveld 408576698