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

Unified Diff: third_party/WebKit/Source/core/layout/line/TrailingObjects.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/line/TrailingObjects.cpp
diff --git a/third_party/WebKit/Source/core/layout/line/TrailingObjects.cpp b/third_party/WebKit/Source/core/layout/line/TrailingObjects.cpp
index 605d37d4a8dafeca4729dcc3f822d625c320736d..45889b18ce4af3f95a1d7b564ab0e0f265c00c0b 100644
--- a/third_party/WebKit/Source/core/layout/line/TrailingObjects.cpp
+++ b/third_party/WebKit/Source/core/layout/line/TrailingObjects.cpp
@@ -49,7 +49,7 @@ void TrailingObjects::updateMidpointsForTrailingObjects(
.getLineLayoutItem() != m_whitespace;
--trailingSpaceMidpoint) {
}
- ASSERT(trailingSpaceMidpoint >= 0);
+ DCHECK_GE(trailingSpaceMidpoint, 0);
if (collapseFirstSpace == CollapseFirstSpace)
lineMidpointState.midpoints()[trailingSpaceMidpoint].setOffset(
lineMidpointState.midpoints()[trailingSpaceMidpoint].offset() - 1);
@@ -63,15 +63,15 @@ void TrailingObjects::updateMidpointsForTrailingObjects(
ensureLineBoxInsideIgnoredSpaces(&lineMidpointState,
LineLayoutItem(m_objects[i]));
} else {
- ASSERT(lineMidpointState.midpoints()[currentMidpoint]
+ DCHECK(lineMidpointState.midpoints()[currentMidpoint]
.getLineLayoutItem() == m_objects[i]);
- ASSERT(lineMidpointState.midpoints()[currentMidpoint + 1]
+ DCHECK(lineMidpointState.midpoints()[currentMidpoint + 1]
.getLineLayoutItem() == m_objects[i]);
}
currentMidpoint += 2;
}
} else if (!lBreak.getLineLayoutItem()) {
- ASSERT(collapseFirstSpace == CollapseFirstSpace);
+ DCHECK_EQ(collapseFirstSpace, CollapseFirstSpace);
// Add a new end midpoint that stops right at the very end.
unsigned length = m_whitespace.textLength();
unsigned pos = length >= 2 ? length - 2 : UINT_MAX;

Powered by Google App Engine
This is Rietveld 408576698