Index: Source/core/layout/LayoutTableSection.cpp |
diff --git a/Source/core/layout/LayoutTableSection.cpp b/Source/core/layout/LayoutTableSection.cpp |
index f8e4c0b3927abd5e0178c2ee1c8cbc06a382e505..afb1424af20b17dd535baaf7b8b72eb90a7b5c23 100644 |
--- a/Source/core/layout/LayoutTableSection.cpp |
+++ b/Source/core/layout/LayoutTableSection.cpp |
@@ -80,8 +80,10 @@ row, const LayoutTableCell* cell) |
void CellSpan::ensureConsistency(const unsigned maximumSpanSize) |
{ |
- RELEASE_ASSERT(m_start >= 0 && m_start <= maximumSpanSize); |
- RELEASE_ASSERT(m_end >= 0 && m_end <= maximumSpanSize); |
+ static_assert(WTF::IsSameType<decltype(m_start), unsigned>::value, "Asserts below assume m_start is unsigned"); |
+ static_assert(WTF::IsSameType<decltype(m_end), unsigned>::value, "Asserts below assume m_end is unsigned"); |
+ RELEASE_ASSERT(m_start <= maximumSpanSize); |
+ RELEASE_ASSERT(m_end <= maximumSpanSize); |
RELEASE_ASSERT(m_start <= m_end); |
} |