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

Unified Diff: third_party/WebKit/Source/core/html/forms/EmailInputType.cpp

Issue 2097313002: Replace ASSERT macros with DCHECK, etc. in core/html/forms/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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/core/html/forms/EmailInputType.cpp
diff --git a/third_party/WebKit/Source/core/html/forms/EmailInputType.cpp b/third_party/WebKit/Source/core/html/forms/EmailInputType.cpp
index ea55a6bc744d7f58409c6cff4dd9c0c27c8504fa..4f0c64e04e81934ce67a623e856bfa22651510df 100644
--- a/third_party/WebKit/Source/core/html/forms/EmailInputType.cpp
+++ b/third_party/WebKit/Source/core/html/forms/EmailInputType.cpp
@@ -75,7 +75,7 @@ String EmailInputType::convertEmailAddressToASCII(const ScriptRegexp& regexp, co
// Leak |idna| at the end.
UErrorCode errorCode = U_ZERO_ERROR;
static icu::IDNA *idna = icu::IDNA::createUTS46Instance(idnaConversionOption, errorCode);
- ASSERT(idna);
+ DCHECK(idna);
icu::IDNAInfo idnaInfo;
idna->nameToASCII(idnDomainName, domainName, idnaInfo, errorCode);
if (U_FAILURE(errorCode) || idnaInfo.hasErrors() || domainName.length() > maximumDomainNameLength)
@@ -211,7 +211,7 @@ bool EmailInputType::typeMismatch() const
String EmailInputType::typeMismatchText() const
{
String invalidAddress = findInvalidAddress(element().value());
- ASSERT(!invalidAddress.isNull());
+ DCHECK(!invalidAddress.isNull());
if (invalidAddress.isEmpty())
return locale().queryString(WebLocalizedString::ValidationTypeMismatchForEmailEmpty);
String atSign = String("@");
@@ -239,7 +239,7 @@ String EmailInputType::typeMismatchText() const
}
if (!checkValidDotUsage(domain)) {
size_t atIndexInUnicode = unicodeAddress.find('@');
- ASSERT(atIndexInUnicode != kNotFound);
+ DCHECK_NE(atIndexInUnicode, kNotFound);
return locale().queryString(WebLocalizedString::ValidationTypeMismatchForEmailInvalidDots, String("."), unicodeAddress.substring(atIndexInUnicode + 1));
}
if (element().multiple())

Powered by Google App Engine
This is Rietveld 408576698