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

Unified Diff: third_party/WebKit/Source/platform/text/BidiContext.cpp

Issue 2811453002: Replace ASSERT, ASSERT_NOT_REACHED, and RELEASE_ASSERT in platform/text (Closed)
Patch Set: Replace ASSERT, ASSERT_NOT_REACHED, and RELEASE_ASSERT in platform/text 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/text/BidiContext.cpp
diff --git a/third_party/WebKit/Source/platform/text/BidiContext.cpp b/third_party/WebKit/Source/platform/text/BidiContext.cpp
index 6aa7a26ed0003cd2a8c866f58b2ef773206d218f..e10cccd9fd2fbcbbb80e9ab706b07771d26e075d 100644
--- a/third_party/WebKit/Source/platform/text/BidiContext.cpp
+++ b/third_party/WebKit/Source/platform/text/BidiContext.cpp
@@ -51,12 +51,12 @@ PassRefPtr<BidiContext> BidiContext::create(unsigned char level,
bool override,
BidiEmbeddingSource source,
BidiContext* parent) {
- ASSERT(direction == (level % 2 ? RightToLeft : LeftToRight));
+ DCHECK_EQ(direction, (level % 2 ? RightToLeft : LeftToRight));
if (parent || level >= 2)
return createUncached(level, direction, override, source, parent);
- ASSERT(level <= 1);
+ DCHECK_LE(level, 1);
if (!level) {
if (!override) {
DEFINE_STATIC_REF(
@@ -86,7 +86,7 @@ PassRefPtr<BidiContext> BidiContext::create(unsigned char level,
static inline PassRefPtr<BidiContext> copyContextAndRebaselineLevel(
BidiContext* context,
BidiContext* parent) {
- ASSERT(context);
+ DCHECK(context);
unsigned char newLevel = parent ? parent->level() : 0;
if (context->dir() == RightToLeft)
newLevel = nextGreaterOddLevel(newLevel);
@@ -107,7 +107,7 @@ BidiContext::copyStackRemovingUnicodeEmbeddingContexts() {
if (iter->source() != FromUnicode)
contexts.push_back(iter);
}
- ASSERT(contexts.size());
+ DCHECK(contexts.size());
RefPtr<BidiContext> topContext =
copyContextAndRebaselineLevel(contexts.back(), 0);

Powered by Google App Engine
This is Rietveld 408576698