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

Unified Diff: third_party/WebKit/Source/core/svg/SVGPathStringSource.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/SVGPathStringSource.cpp
diff --git a/third_party/WebKit/Source/core/svg/SVGPathStringSource.cpp b/third_party/WebKit/Source/core/svg/SVGPathStringSource.cpp
index dd46b3a6b1ce48436928fa705d23d87cc8ed87eb..36d87093e518512b489b879fd4aa3c80182f06eb 100644
--- a/third_party/WebKit/Source/core/svg/SVGPathStringSource.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGPathStringSource.cpp
@@ -29,7 +29,7 @@ SVGPathStringSource::SVGPathStringSource(const String& string)
: m_is8BitSource(string.is8Bit()),
m_previousCommand(PathSegUnknown),
m_string(string) {
- ASSERT(!string.isNull());
+ DCHECK(!string.isNull());
if (m_is8BitSource) {
m_current.m_character8 = string.characters8();
@@ -159,7 +159,7 @@ bool SVGPathStringSource::parseArcFlagWithError() {
}
PathSegmentData SVGPathStringSource::parseSegment() {
- ASSERT(hasMoreData());
+ DCHECK(hasMoreData());
PathSegmentData segment;
unsigned lookahead =
m_is8BitSource ? *m_current.m_character8 : *m_current.m_character16;
@@ -177,7 +177,7 @@ PathSegmentData SVGPathStringSource::parseSegment() {
m_current.m_character16++;
} else if (command == PathSegUnknown) {
// Possibly an implicit command.
- ASSERT(m_previousCommand != PathSegUnknown);
+ DCHECK_NE(m_previousCommand, PathSegUnknown);
if (!maybeImplicitCommand(lookahead, m_previousCommand, command)) {
setErrorMark(SVGParseStatus::ExpectedPathCommand);
return segment;
@@ -192,7 +192,7 @@ PathSegmentData SVGPathStringSource::parseSegment() {
segment.command = m_previousCommand = command;
- ASSERT(m_error.status() == SVGParseStatus::NoError);
+ DCHECK_EQ(m_error.status(), SVGParseStatus::NoError);
switch (segment.command) {
case PathSegCurveToCubicRel:
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGPathStringBuilder.cpp ('k') | third_party/WebKit/Source/core/svg/SVGPolyElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698