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

Unified Diff: third_party/WebKit/Source/core/html/forms/NumberInputType.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/NumberInputType.cpp
diff --git a/third_party/WebKit/Source/core/html/forms/NumberInputType.cpp b/third_party/WebKit/Source/core/html/forms/NumberInputType.cpp
index d234c1ebf23b9423941eb5ba358bb9c6a7e10d3b..4006b60fea77a8ed27459617d7ce785982995a1a 100644
--- a/third_party/WebKit/Source/core/html/forms/NumberInputType.cpp
+++ b/third_party/WebKit/Source/core/html/forms/NumberInputType.cpp
@@ -74,7 +74,7 @@ struct RealNumberRenderSize {
static RealNumberRenderSize calculateRenderSize(const Decimal& value)
{
- ASSERT(value.isFinite());
+ DCHECK(value.isFinite());
const unsigned sizeOfDigits = String::number(value.value().coefficient()).length();
const unsigned sizeOfSign = value.isNegative() ? 1 : 0;
const int exponent = value.exponent();
@@ -137,7 +137,7 @@ bool NumberInputType::typeMismatchFor(const String& value) const
bool NumberInputType::typeMismatch() const
{
- ASSERT(!typeMismatchFor(element().value()));
+ DCHECK(!typeMismatchFor(element().value()));
return false;
}
@@ -165,7 +165,7 @@ bool NumberInputType::sizeShouldIncludeDecoration(int defaultSize, int& preferre
return false;
const Decimal step = parseToDecimalForNumberType(stepString, 1);
- ASSERT(step.isFinite());
+ DCHECK(step.isFinite());
RealNumberRenderSize size = calculateRenderSize(minimum).max(calculateRenderSize(maximum).max(calculateRenderSize(step)));

Powered by Google App Engine
This is Rietveld 408576698