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

Unified Diff: third_party/WebKit/Source/wtf/MathExtras.h

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
« no previous file with comments | « third_party/WebKit/Source/wtf/ListHashSet.h ('k') | third_party/WebKit/Source/wtf/RefCounted.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/wtf/MathExtras.h
diff --git a/third_party/WebKit/Source/wtf/MathExtras.h b/third_party/WebKit/Source/wtf/MathExtras.h
index f7da0f3722304df4718a24b6584c38b7d6607690..efcd871bb32a0639202c4fbc81e024b16cf7925c 100644
--- a/third_party/WebKit/Source/wtf/MathExtras.h
+++ b/third_party/WebKit/Source/wtf/MathExtras.h
@@ -358,8 +358,8 @@ template <typename LimitType, typename ValueType>
inline LimitType clampTo(ValueType value,
LimitType min = defaultMinimumForClamp<LimitType>(),
LimitType max = defaultMaximumForClamp<LimitType>()) {
- ASSERT(!std::isnan(static_cast<double>(value)));
- ASSERT(min <= max); // This also ensures |min| and |max| aren't NaN.
+ DCHECK(!std::isnan(static_cast<double>(value)));
+ DCHECK_LE(min, max); // This also ensures |min| and |max| aren't NaN.
return ClampToHelper<LimitType, ValueType>::clampTo(value, min, max);
}
« no previous file with comments | « third_party/WebKit/Source/wtf/ListHashSet.h ('k') | third_party/WebKit/Source/wtf/RefCounted.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698