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

Unified Diff: third_party/WebKit/Source/core/html/parser/HTMLSrcsetParser.cpp

Issue 2751483005: Replace ASSERT, ASSERT_NOT_REACHED, and RELEASE_ASSERT in core/html/parser/ (Closed)
Patch Set: rebase 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/html/parser/HTMLSrcsetParser.cpp
diff --git a/third_party/WebKit/Source/core/html/parser/HTMLSrcsetParser.cpp b/third_party/WebKit/Source/core/html/parser/HTMLSrcsetParser.cpp
index 3cc8587e437073a3c97056537cd99466226b2a62..ebde0abc9634ee6599fca6e8c206f04b6a3230eb 100644
--- a/third_party/WebKit/Source/core/html/parser/HTMLSrcsetParser.cpp
+++ b/third_party/WebKit/Source/core/html/parser/HTMLSrcsetParser.cpp
@@ -334,9 +334,9 @@ static void parseImageCandidatesFromSrcsetAttribute(
}
}
- ASSERT(imageURLEnd > attributeStart);
+ DCHECK_GT(imageURLEnd, attributeStart);
unsigned imageURLStartingPosition = imageURLStart - attributeStart;
- ASSERT(imageURLEnd > imageURLStart);
+ DCHECK_GT(imageURLEnd, imageURLStart);
unsigned imageURLLength = imageURLEnd - imageURLStart;
imageCandidates.push_back(
ImageCandidate(attribute, imageURLStartingPosition, imageURLLength,
@@ -434,7 +434,7 @@ static ImageCandidate pickBestImageCandidate(
prevDensity = image.density();
}
unsigned winner = selectionLogic(deDupedImageCandidates, deviceScaleFactor);
- ASSERT(winner < deDupedImageCandidates.size());
+ DCHECK_LT(winner, deDupedImageCandidates.size());
winner = avoidDownloadIfHigherDensityResourceIsInCache(deDupedImageCandidates,
winner, document);

Powered by Google App Engine
This is Rietveld 408576698