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

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: fix 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 cdbaa247b82be4858521c9a28af1a71e695b68fd..25659070515c2eb023db59dd19c896aef2001c8f 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 ? kRightToLeft : kLeftToRight));
+ DCHECK_EQ(direction, (level % 2 ? kRightToLeft : kLeftToRight));
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(
@@ -87,7 +87,7 @@ PassRefPtr<BidiContext> BidiContext::Create(unsigned char level,
static inline PassRefPtr<BidiContext> CopyContextAndRebaselineLevel(
BidiContext* context,
BidiContext* parent) {
- ASSERT(context);
+ DCHECK(context);
unsigned char new_level = parent ? parent->Level() : 0;
if (context->Dir() == kRightToLeft)
new_level = NextGreaterOddLevel(new_level);
@@ -108,7 +108,7 @@ BidiContext::CopyStackRemovingUnicodeEmbeddingContexts() {
if (iter->Source() != kFromUnicode)
contexts.push_back(iter);
}
- ASSERT(contexts.size());
+ DCHECK(contexts.size());
RefPtr<BidiContext> top_context =
CopyContextAndRebaselineLevel(contexts.back(), 0);
« no previous file with comments | « third_party/WebKit/Source/platform/text/BidiContext.h ('k') | third_party/WebKit/Source/platform/text/BidiResolver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698