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

Unified Diff: third_party/WebKit/Source/platform/graphics/GraphicsTypes.cpp

Issue 2807923002: Replace ASSERT, ASSERT_NOT_REACHED, and RELEASE_ASSERT in platform/graphics (Closed)
Patch Set: Replace ASSERT, ASSERT_NOT_REACHED, and RELEASE_ASSERT in platform/graphics Created 3 years, 8 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/platform/graphics/GraphicsTypes.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/GraphicsTypes.cpp b/third_party/WebKit/Source/platform/graphics/GraphicsTypes.cpp
index 96f536a9d170c09bd9f9bc513904cdff0ffa5d51..90ae1cffd1f8e13afd1e062c3fb401b49a94e32e 100644
--- a/third_party/WebKit/Source/platform/graphics/GraphicsTypes.cpp
+++ b/third_party/WebKit/Source/platform/graphics/GraphicsTypes.cpp
@@ -75,9 +75,9 @@ bool parseCompositeAndBlendOperator(const String& s,
}
String compositeOperatorName(CompositeOperator op, WebBlendMode blendOp) {
- ASSERT(op >= 0);
- ASSERT(op < numCompositeOperatorNames);
- ASSERT(blendOp >= 0);
+ DCHECK_GE(op, 0);
+ DCHECK_LT(op, numCompositeOperatorNames);
+ DCHECK_GE(blendOp, 0);
if (blendOp != WebBlendModeNormal)
return blendOperatorNames[blendOp];
return compositeOperatorNames[op];
@@ -100,8 +100,8 @@ bool parseLineCap(const String& s, LineCap& cap) {
}
String lineCapName(LineCap cap) {
- ASSERT(cap >= 0);
- ASSERT(cap < 3);
+ DCHECK_GE(cap, 0);
+ DCHECK_LT(cap, 3);
const char* const names[3] = {"butt", "round", "square"};
return names[cap];
}
@@ -123,15 +123,15 @@ bool parseLineJoin(const String& s, LineJoin& join) {
}
String lineJoinName(LineJoin join) {
- ASSERT(join >= 0);
- ASSERT(join < 3);
+ DCHECK_GE(join, 0);
+ DCHECK_LT(join, 3);
const char* const names[3] = {"miter", "round", "bevel"};
return names[join];
}
String textAlignName(TextAlign align) {
- ASSERT(align >= 0);
- ASSERT(align < 5);
+ DCHECK_GE(align, 0);
+ DCHECK_LT(align, 5);
const char* const names[5] = {"start", "end", "left", "center", "right"};
return names[align];
}
@@ -161,8 +161,8 @@ bool parseTextAlign(const String& s, TextAlign& align) {
}
String textBaselineName(TextBaseline baseline) {
- ASSERT(baseline >= 0);
- ASSERT(baseline < 6);
+ DCHECK_GE(baseline, 0);
+ DCHECK_LT(baseline, 6);
const char* const names[6] = {"alphabetic", "top", "middle",
"bottom", "ideographic", "hanging"};
return names[baseline];

Powered by Google App Engine
This is Rietveld 408576698