| Index: third_party/WebKit/Source/core/html/parser/BackgroundHTMLInputStream.cpp
|
| diff --git a/third_party/WebKit/Source/core/html/parser/BackgroundHTMLInputStream.cpp b/third_party/WebKit/Source/core/html/parser/BackgroundHTMLInputStream.cpp
|
| index a5e6a25fef1da2ec5d687de1c67b02e749555220..eaa13d6d54e299461cd301ed9282c2071cf8eb3f 100644
|
| --- a/third_party/WebKit/Source/core/html/parser/BackgroundHTMLInputStream.cpp
|
| +++ b/third_party/WebKit/Source/core/html/parser/BackgroundHTMLInputStream.cpp
|
| @@ -52,17 +52,17 @@ HTMLInputCheckpoint BackgroundHTMLInputStream::createCheckpoint(
|
|
|
| void BackgroundHTMLInputStream::invalidateCheckpointsBefore(
|
| HTMLInputCheckpoint newFirstValidCheckpointIndex) {
|
| - ASSERT(newFirstValidCheckpointIndex < m_checkpoints.size());
|
| + DCHECK_LT(newFirstValidCheckpointIndex, m_checkpoints.size());
|
| // There is nothing to do for the first valid checkpoint.
|
| if (m_firstValidCheckpointIndex == newFirstValidCheckpointIndex)
|
| return;
|
|
|
| - ASSERT(newFirstValidCheckpointIndex > m_firstValidCheckpointIndex);
|
| + DCHECK_GT(newFirstValidCheckpointIndex, m_firstValidCheckpointIndex);
|
| const Checkpoint& lastInvalidCheckpoint =
|
| m_checkpoints[newFirstValidCheckpointIndex - 1];
|
|
|
| - ASSERT(m_firstValidSegmentIndex <=
|
| - lastInvalidCheckpoint.numberOfSegmentsAlreadyAppended);
|
| + DCHECK_LE(m_firstValidSegmentIndex,
|
| + lastInvalidCheckpoint.numberOfSegmentsAlreadyAppended);
|
| for (size_t i = m_firstValidSegmentIndex;
|
| i < lastInvalidCheckpoint.numberOfSegmentsAlreadyAppended; ++i)
|
| m_segments[i] = String();
|
| @@ -79,11 +79,14 @@ void BackgroundHTMLInputStream::invalidateCheckpointsBefore(
|
|
|
| void BackgroundHTMLInputStream::rewindTo(HTMLInputCheckpoint checkpointIndex,
|
| const String& unparsedInput) {
|
| - ASSERT(checkpointIndex <
|
| - m_checkpoints
|
| - .size()); // If this ASSERT fires, checkpointIndex is invalid.
|
| + DCHECK_LT(checkpointIndex,
|
| + m_checkpoints
|
| + .size()); // If this DCHECK fires, checkpointIndex is invalid.
|
| const Checkpoint& checkpoint = m_checkpoints[checkpointIndex];
|
| - ASSERT(!checkpoint.isNull());
|
| +
|
| +#if DCHECK_IS_ON()
|
| + DCHECK(!checkpoint.isNull());
|
| +#endif
|
|
|
| bool isClosed = m_current.isClosed();
|
|
|
| @@ -91,7 +94,7 @@ void BackgroundHTMLInputStream::rewindTo(HTMLInputCheckpoint checkpointIndex,
|
|
|
| for (size_t i = checkpoint.numberOfSegmentsAlreadyAppended;
|
| i < m_segments.size(); ++i) {
|
| - ASSERT(!m_segments[i].isNull());
|
| + DCHECK(!m_segments[i].isNull());
|
| m_current.append(SegmentedString(m_segments[i]));
|
| }
|
|
|
| @@ -103,7 +106,7 @@ void BackgroundHTMLInputStream::rewindTo(HTMLInputCheckpoint checkpointIndex,
|
| if (isClosed && !m_current.isClosed())
|
| m_current.close();
|
|
|
| - ASSERT(m_current.isClosed() == isClosed);
|
| + DCHECK_EQ(m_current.isClosed(), isClosed);
|
|
|
| m_segments.clear();
|
| m_checkpoints.clear();
|
|
|