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

Unified Diff: third_party/WebKit/Source/core/html/forms/MonthInputType.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/MonthInputType.cpp
diff --git a/third_party/WebKit/Source/core/html/forms/MonthInputType.cpp b/third_party/WebKit/Source/core/html/forms/MonthInputType.cpp
index 3c60b01bcedacccaa342fc77d3934cf5742fe6e7..ac90f361dd1afc476a1b5d9c8902c78fb141d1e8 100644
--- a/third_party/WebKit/Source/core/html/forms/MonthInputType.cpp
+++ b/third_party/WebKit/Source/core/html/forms/MonthInputType.cpp
@@ -70,7 +70,7 @@ double MonthInputType::valueAsDate() const
if (!parseToDateComponents(element().value(), &date))
return DateComponents::invalidMilliseconds();
double msec = date.millisecondsSinceEpoch();
- ASSERT(std::isfinite(msec));
+ DCHECK(std::isfinite(msec));
return msec;
}
@@ -87,7 +87,7 @@ Decimal MonthInputType::defaultValueForStepUp() const
DateComponents date;
date.setMillisecondsSinceEpochForMonth(convertToLocalTime(currentTimeMS()));
double months = date.monthsSinceEpoch();
- ASSERT(std::isfinite(months));
+ DCHECK(std::isfinite(months));
return Decimal::fromDouble(months);
}
@@ -104,20 +104,20 @@ Decimal MonthInputType::parseToNumber(const String& src, const Decimal& defaultV
if (!parseToDateComponents(src, &date))
return defaultValue;
double months = date.monthsSinceEpoch();
- ASSERT(std::isfinite(months));
+ DCHECK(std::isfinite(months));
return Decimal::fromDouble(months);
}
bool MonthInputType::parseToDateComponentsInternal(const String& string, DateComponents* out) const
{
- ASSERT(out);
+ DCHECK(out);
unsigned end;
return out->parseMonth(string, 0, end) && end == string.length();
}
bool MonthInputType::setMillisecondToDateComponents(double value, DateComponents* date) const
{
- ASSERT(date);
+ DCHECK(date);
return date->setMonthsSinceEpoch(value);
}

Powered by Google App Engine
This is Rietveld 408576698