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

Unified Diff: third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzShaper.cpp

Issue 2884923002: Make DCHECK of range shape result more verbose (Closed)
Patch Set: Make DCHECK more verbose Created 3 years, 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzShaper.cpp
diff --git a/third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzShaper.cpp b/third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzShaper.cpp
index ee7ce043a66a001117b7981da386b86cf749c958..7562f9ece9bd4856261f206d59c191991eef2e8f 100644
--- a/third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzShaper.cpp
+++ b/third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzShaper.cpp
@@ -713,8 +713,15 @@ PassRefPtr<ShapeResult> HarfBuzzShaper::Shape(const Font* font,
if (start < segment_range.end && end > segment_range.start)
ShapeSegment(&range_data, segment_range, result.Get());
}
- DCHECK(!result->NumCharacters() || (start == result->StartIndexForResult() &&
- end == result->EndIndexForResult()));
+
+#if DCHECK_IS_ON()
+ DCHECK_EQ(length, result->NumCharacters());
+ if (length) {
+ DCHECK_EQ(start, result->StartIndexForResult());
+ DCHECK_EQ(end, result->EndIndexForResult());
+ }
+#endif
+
return result.Release();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698