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

Unified Diff: third_party/WebKit/Source/platform/PODRedBlackTree.h

Issue 2846303002: Replace ASSERT with DCHECK in platform/ (Closed)
Patch Set: rebase 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/PODRedBlackTree.h
diff --git a/third_party/WebKit/Source/platform/PODRedBlackTree.h b/third_party/WebKit/Source/platform/PODRedBlackTree.h
index a3d9c74f2db52672c1ac22e453fdd1b29a077f8e..0edbe96dcd8ca0e1eca4106c3cf2b50a91a5727c 100644
--- a/third_party/WebKit/Source/platform/PODRedBlackTree.h
+++ b/third_party/WebKit/Source/platform/PODRedBlackTree.h
@@ -171,14 +171,14 @@ class PODRedBlackTree {
}
void Add(const T& data) {
- ASSERT(IsInitialized());
+ DCHECK(IsInitialized());
Node* node = arena_->template AllocateObject<T>(data);
InsertNode(node);
}
// Returns true if the datum was found in the tree.
bool Remove(const T& data) {
- ASSERT(IsInitialized());
+ DCHECK(IsInitialized());
Node* node = TreeSearch(data);
if (node) {
DeleteNode(node);
@@ -188,19 +188,19 @@ class PODRedBlackTree {
}
bool Contains(const T& data) const {
- ASSERT(IsInitialized());
+ DCHECK(IsInitialized());
return TreeSearch(data);
}
void VisitInorder(Visitor* visitor) const {
- ASSERT(IsInitialized());
+ DCHECK(IsInitialized());
if (!root_)
return;
VisitInorderImpl(root_, visitor);
}
int size() const {
- ASSERT(IsInitialized());
+ DCHECK(IsInitialized());
Counter counter;
VisitInorder(&counter);
return counter.Count();
@@ -212,7 +212,7 @@ class PODRedBlackTree {
}
virtual bool CheckInvariants() const {
- ASSERT(IsInitialized());
+ DCHECK(IsInitialized());
int black_count;
return CheckInvariantsFromNode(root_, &black_count);
}
@@ -544,7 +544,7 @@ class PODRedBlackTree {
// the code; it comes about from the properties of the
// red-black tree.
Node* w = x_parent->Right();
- ASSERT(w); // x's sibling should not be null.
+ DCHECK(w); // x's sibling should not be null.
if (w->GetColor() == kRed) {
// Case 1
w->SetColor(kBlack);
@@ -584,7 +584,7 @@ class PODRedBlackTree {
// the code; it comes about from the properties of the
// red-black tree.
Node* w = x_parent->Left();
- ASSERT(w); // x's sibling should not be null.
+ DCHECK(w); // x's sibling should not be null.
if (w->GetColor() == kRed) {
// Case 1
w->SetColor(kBlack);
« no previous file with comments | « third_party/WebKit/Source/platform/LinkHash.h ('k') | third_party/WebKit/Source/platform/PluginScriptForbiddenScope.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698