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

Unified Diff: third_party/WebKit/Source/wtf/text/TextCodecICU.cpp

Issue 2585673002: Replace ASSERT, ENABLE(ASSERT), and ASSERT_NOT_REACHED in wtf (Closed)
Patch Set: Fix an Asan issue with LinkedHashSetNodeBase::unlink Created 4 years 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/wtf/text/TextCodecICU.cpp
diff --git a/third_party/WebKit/Source/wtf/text/TextCodecICU.cpp b/third_party/WebKit/Source/wtf/text/TextCodecICU.cpp
index 26513c06fc145c423a600e865ade039f0a8d48fe..a801d6103e46feefbfd86fcd04523a1843857883 100644
--- a/third_party/WebKit/Source/wtf/text/TextCodecICU.cpp
+++ b/third_party/WebKit/Source/wtf/text/TextCodecICU.cpp
@@ -113,12 +113,12 @@ void TextCodecICU::registerEncodingNames(EncodingNameRegistrar registrar) {
registrar(standardName, standardName);
uint16_t numAliases = ucnv_countAliases(name, &error);
- ASSERT(U_SUCCESS(error));
+ DCHECK(U_SUCCESS(error));
if (U_SUCCESS(error))
for (uint16_t j = 0; j < numAliases; ++j) {
error = U_ZERO_ERROR;
const char* alias = ucnv_getAlias(name, j, &error);
- ASSERT(U_SUCCESS(error));
+ DCHECK(U_SUCCESS(error));
if (U_SUCCESS(error) && alias != standardName)
registrar(alias, standardName);
}
@@ -269,7 +269,7 @@ void TextCodecICU::releaseICUConverter() const {
}
void TextCodecICU::createICUConverter() const {
- ASSERT(!m_converterICU);
+ DCHECK(!m_converterICU);
#if defined(USING_SYSTEM_ICU)
const char* name = m_encoding.name();
@@ -353,7 +353,7 @@ String TextCodecICU::decode(const char* bytes,
// Get a converter for the passed-in encoding.
if (!m_converterICU) {
createICUConverter();
- ASSERT(m_converterICU);
+ DCHECK(m_converterICU);
if (!m_converterICU) {
DLOG(ERROR)
<< "error creating ICU encoder even though encoding was in table";
@@ -658,7 +658,7 @@ CString TextCodecICU::encodeInternal(const TextCodecInput& input,
break;
}
- ASSERT(U_SUCCESS(err));
+ DCHECK(U_SUCCESS(err));
if (U_FAILURE(err))
return CString();
« no previous file with comments | « third_party/WebKit/Source/wtf/text/TextCodec.cpp ('k') | third_party/WebKit/Source/wtf/text/TextCodecUTF16.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698