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

Unified Diff: third_party/WebKit/Source/core/svg/SVGParsingError.cpp

Issue 2738863002: Replace ASSERT with DCHECK in core/svg/ (Closed)
Patch Set: Split DCHECKS wherever possible 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/svg/SVGParsingError.cpp
diff --git a/third_party/WebKit/Source/core/svg/SVGParsingError.cpp b/third_party/WebKit/Source/core/svg/SVGParsingError.cpp
index db221a455d1a41ab1744bcb26b50ba05ef963a13..a9f9be1b053b9d73e64e70d1c719116d6290371d 100644
--- a/third_party/WebKit/Source/core/svg/SVGParsingError.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGParsingError.cpp
@@ -83,15 +83,15 @@ void appendValue(StringBuilder& builder,
} else {
// Emit a string on the form: '"[...]<before><after>[...]"'
unsigned locus = error.locus();
- ASSERT(locus <= value.length());
+ DCHECK_LE(locus, value.length());
// Amount of context to show before/after the error.
const unsigned kContext = 16;
unsigned contextStart = std::max(locus, kContext) - kContext;
unsigned contextEnd = std::min(locus + kContext, value.length());
- ASSERT(contextStart <= contextEnd);
- ASSERT(contextEnd <= value.length());
+ DCHECK_LE(contextStart, contextEnd);
+ DCHECK_LE(contextEnd, value.length());
if (contextStart != 0)
builder.append(horizontalEllipsisCharacter);
escapeStringForJSON(
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGParsingError.h ('k') | third_party/WebKit/Source/core/svg/SVGPath.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698