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

Unified Diff: third_party/WebKit/Source/platform/heap/PersistentNode.h

Issue 2816033003: Replace ASSERT with DHCECK_op in platform/heap (Closed)
Patch Set: Replace ASSERT with CHECK_op in platform/heap 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/heap/PersistentNode.h
diff --git a/third_party/WebKit/Source/platform/heap/PersistentNode.h b/third_party/WebKit/Source/platform/heap/PersistentNode.h
index 84ef3ce745898f8c9d0ddd3fd6f56e428d1338cc..9ed41b0db03c42f9093034a87bf8e58ca1d55606 100644
--- a/third_party/WebKit/Source/platform/heap/PersistentNode.h
+++ b/third_party/WebKit/Source/platform/heap/PersistentNode.h
@@ -21,7 +21,7 @@ class PersistentNode final {
DISALLOW_NEW();
public:
- PersistentNode() : self_(nullptr), trace_(nullptr) { ASSERT(IsUnused()); }
+ PersistentNode() : self_(nullptr), trace_(nullptr) { DCHECK(IsUnused()); }
#if DCHECK_IS_ON()
~PersistentNode() {
@@ -29,7 +29,7 @@ class PersistentNode final {
// without clearing persistent handles that the thread created.
// We don't enable the assert for the main thread because the
// main thread finishes without clearing all persistent handles.
- ASSERT(IsMainThread() || IsUnused());
+ DCHECK(IsMainThread() || IsUnused());
}
#endif
@@ -45,28 +45,28 @@ class PersistentNode final {
// type of the most specific child and calls trace directly. See
// TraceMethodDelegate in Visitor.h for how this is done.
void TracePersistentNode(Visitor* visitor) {
- ASSERT(!IsUnused());
- ASSERT(trace_);
+ DCHECK(!IsUnused());
+ DCHECK(trace_);
trace_(visitor, self_);
}
void Initialize(void* self, TraceCallback trace) {
- ASSERT(IsUnused());
+ DCHECK(IsUnused());
self_ = self;
trace_ = trace;
}
void SetFreeListNext(PersistentNode* node) {
- ASSERT(!node || node->IsUnused());
+ DCHECK(!node || node->IsUnused());
self_ = node;
trace_ = nullptr;
- ASSERT(IsUnused());
+ DCHECK(IsUnused());
}
PersistentNode* FreeListNext() {
- ASSERT(IsUnused());
+ DCHECK(IsUnused());
PersistentNode* node = reinterpret_cast<PersistentNode*>(self_);
- ASSERT(!node || node->IsUnused());
+ DCHECK(!node || node->IsUnused());
return node;
}
@@ -121,11 +121,11 @@ class PLATFORM_EXPORT PersistentRegion final {
#endif
if (UNLIKELY(!free_list_head_))
EnsurePersistentNodeSlots(self, trace);
- ASSERT(free_list_head_);
+ DCHECK(free_list_head_);
PersistentNode* node = free_list_head_;
free_list_head_ = free_list_head_->FreeListNext();
node->Initialize(self, trace);
- ASSERT(!node->IsUnused());
+ DCHECK(!node->IsUnused());
return node;
}

Powered by Google App Engine
This is Rietveld 408576698