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

Unified Diff: third_party/WebKit/Source/core/style/GridArea.h

Issue 2751653003: Replace ASSERT and ASSERT_NOT_REACHED in core/style/ (Closed)
Patch Set: Replace ASSERT and ASSERT_NOT_REACHED in core/style/ Created 3 years, 9 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
« no previous file with comments | « third_party/WebKit/Source/core/style/FillLayer.h ('k') | third_party/WebKit/Source/core/style/GridLength.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/style/GridArea.h
diff --git a/third_party/WebKit/Source/core/style/GridArea.h b/third_party/WebKit/Source/core/style/GridArea.h
index daa3a00ca86eda0b345b0c2181d0e122c2be4f16..7d15f634e3b1ab666ed507a933da6536fc2dcb83 100644
--- a/third_party/WebKit/Source/core/style/GridArea.h
+++ b/third_party/WebKit/Source/core/style/GridArea.h
@@ -70,30 +70,30 @@ struct GridSpan {
}
size_t integerSpan() const {
- ASSERT(isTranslatedDefinite());
- ASSERT(m_endLine > m_startLine);
+ DCHECK(isTranslatedDefinite());
+ DCHECK_GT(m_endLine, m_startLine);
return m_endLine - m_startLine;
}
int untranslatedStartLine() const {
- ASSERT(m_type == UntranslatedDefinite);
+ DCHECK_EQ(m_type, UntranslatedDefinite);
return m_startLine;
}
int untranslatedEndLine() const {
- ASSERT(m_type == UntranslatedDefinite);
+ DCHECK_EQ(m_type, UntranslatedDefinite);
return m_endLine;
}
size_t startLine() const {
- ASSERT(isTranslatedDefinite());
- ASSERT(m_startLine >= 0);
+ DCHECK(isTranslatedDefinite());
+ DCHECK_GE(m_startLine, 0);
return m_startLine;
}
size_t endLine() const {
- ASSERT(isTranslatedDefinite());
- ASSERT(m_endLine > 0);
+ DCHECK(isTranslatedDefinite());
+ DCHECK_GT(m_endLine, 0);
return m_endLine;
}
@@ -110,12 +110,12 @@ struct GridSpan {
};
GridSpanIterator begin() const {
- ASSERT(isTranslatedDefinite());
+ DCHECK(isTranslatedDefinite());
return m_startLine;
}
GridSpanIterator end() const {
- ASSERT(isTranslatedDefinite());
+ DCHECK(isTranslatedDefinite());
return m_endLine;
}
@@ -124,14 +124,14 @@ struct GridSpan {
bool isIndefinite() const { return m_type == Indefinite; }
void translate(size_t offset) {
- ASSERT(m_type == UntranslatedDefinite);
+ DCHECK_EQ(m_type, UntranslatedDefinite);
m_type = TranslatedDefinite;
m_startLine += offset;
m_endLine += offset;
- ASSERT(m_startLine >= 0);
- ASSERT(m_endLine > 0);
+ DCHECK_GE(m_startLine, 0);
+ DCHECK_GT(m_endLine, 0);
}
private:
@@ -139,10 +139,10 @@ struct GridSpan {
GridSpan(int startLine, int endLine, GridSpanType type) : m_type(type) {
#if DCHECK_IS_ON()
- ASSERT(startLine < endLine);
+ DCHECK_LT(startLine, endLine);
if (type == TranslatedDefinite) {
- ASSERT(startLine >= 0);
- ASSERT(endLine > 0);
+ DCHECK_GE(startLine, 0);
+ DCHECK_GT(endLine, 0);
}
#endif
« no previous file with comments | « third_party/WebKit/Source/core/style/FillLayer.h ('k') | third_party/WebKit/Source/core/style/GridLength.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698