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

Unified Diff: third_party/WebKit/Source/core/layout/shapes/RasterShape.cpp

Issue 2748103015: Replace ASSERT with DCHECK in core/layout/<sub dirs> (Closed)
Patch Set: Rebase with latest 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
Index: third_party/WebKit/Source/core/layout/shapes/RasterShape.cpp
diff --git a/third_party/WebKit/Source/core/layout/shapes/RasterShape.cpp b/third_party/WebKit/Source/core/layout/shapes/RasterShape.cpp
index 3a7e445643e0ad159683169ee5495fee25924b11..9efaf8df2f9dabfa2ed87d0d87d77db9687bc2e5 100644
--- a/third_party/WebKit/Source/core/layout/shapes/RasterShape.cpp
+++ b/third_party/WebKit/Source/core/layout/shapes/RasterShape.cpp
@@ -57,7 +57,8 @@ MarginIntervalGenerator::MarginIntervalGenerator(unsigned radius)
}
void MarginIntervalGenerator::set(int y, const IntShapeInterval& interval) {
- ASSERT(y >= 0 && interval.x1() >= 0);
+ DCHECK_GE(y, 0);
+ DCHECK_GE(interval.x1(), 0);
m_y = y;
m_x1 = interval.x1();
m_x2 = interval.x2();
@@ -140,7 +141,7 @@ void RasterShapeIntervals::buildBoundsPath(Path& path) const {
}
const RasterShapeIntervals& RasterShape::marginIntervals() const {
- ASSERT(shapeMargin() >= 0);
+ DCHECK_GE(shapeMargin(), 0);
if (!shapeMargin())
return *m_intervals;
@@ -162,7 +163,7 @@ LineSegment RasterShape::getExcludedInterval(LayoutUnit logicalTop,
int y1 = logicalTop.toInt();
int y2 = (logicalTop + logicalHeight).toInt();
- ASSERT(y2 >= y1);
+ DCHECK_GE(y2, y1);
if (y2 < intervals.bounds().y() || y1 >= intervals.bounds().maxY())
return LineSegment();

Powered by Google App Engine
This is Rietveld 408576698