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

Unified Diff: third_party/WebKit/Source/platform/Length.h

Issue 2846303002: Replace ASSERT with DCHECK in platform/ (Closed)
Patch Set: rebase Created 3 years, 8 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/platform/Length.h
diff --git a/third_party/WebKit/Source/platform/Length.h b/third_party/WebKit/Source/platform/Length.h
index a6dc1701947d16d4e526f4bacfe0092c1df69303..6d27e23932ef6111e770de34980ea3072f20e48e 100644
--- a/third_party/WebKit/Source/platform/Length.h
+++ b/third_party/WebKit/Source/platform/Length.h
@@ -141,7 +141,7 @@ class PLATFORM_EXPORT Length {
// FIXME: Make this private (if possible) or at least rename it
// (http://crbug.com/432707).
inline float Value() const {
- ASSERT(!IsCalculated());
+ DCHECK(!IsCalculated());
return GetFloatValue();
}
@@ -207,7 +207,7 @@ class PLATFORM_EXPORT Length {
// functions it's impossible to determine the sign or zero-ness. We assume all
// calc values are positive and non-zero for now.
bool IsZero() const {
- ASSERT(!IsMaxSizeNone());
+ DCHECK(!IsMaxSizeNone());
if (IsCalculated())
return false;
@@ -280,7 +280,7 @@ class PLATFORM_EXPORT Length {
}
float GetFloatValue() const {
- ASSERT(!IsMaxSizeNone());
+ DCHECK(!IsMaxSizeNone());
return is_float_ ? float_value_ : int_value_;
}
float NonNanCalculatedValue(LayoutUnit max_value) const;
@@ -291,14 +291,14 @@ class PLATFORM_EXPORT Length {
private:
int GetIntValue() const {
- ASSERT(!IsMaxSizeNone());
+ DCHECK(!IsMaxSizeNone());
return is_float_ ? static_cast<int>(float_value_) : int_value_;
}
Length BlendMixedTypes(const Length& from, double progress, ValueRange) const;
int CalculationHandle() const {
- ASSERT(IsCalculated());
+ DCHECK(IsCalculated());
return GetIntValue();
}
void IncrementCalculatedRef() const;
« no previous file with comments | « third_party/WebKit/Source/platform/LayoutTestSupport.cpp ('k') | third_party/WebKit/Source/platform/Length.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698