| 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 6fbc02a2bf4fbd6d680518ea8fcaec5e3fbe50bc..560d1623c2fa7d4fcd36d8ba3908534bbc79dfe8 100644
|
| --- a/third_party/WebKit/Source/platform/heap/PersistentNode.h
|
| +++ b/third_party/WebKit/Source/platform/heap/PersistentNode.h
|
| @@ -21,15 +21,15 @@ class PersistentNode final {
|
| DISALLOW_NEW();
|
|
|
| public:
|
| - PersistentNode() : m_self(nullptr), m_trace(nullptr) { ASSERT(isUnused()); }
|
| + PersistentNode() : m_self(nullptr), m_trace(nullptr) { DCHECK(isUnused()); }
|
|
|
| -#if ENABLE(ASSERT)
|
| +#if DCHECK_IS_ON()
|
| ~PersistentNode() {
|
| // If you hit this assert, it means that the thread finished
|
| // 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(m_trace);
|
| + DCHECK(!isUnused());
|
| + DCHECK(m_trace);
|
| m_trace(visitor, m_self);
|
| }
|
|
|
| void initialize(void* self, TraceCallback trace) {
|
| - ASSERT(isUnused());
|
| + DCHECK(isUnused());
|
| m_self = self;
|
| m_trace = trace;
|
| }
|
|
|
| void setFreeListNext(PersistentNode* node) {
|
| - ASSERT(!node || node->isUnused());
|
| + DCHECK(!node || node->isUnused());
|
| m_self = node;
|
| m_trace = nullptr;
|
| - ASSERT(isUnused());
|
| + DCHECK(isUnused());
|
| }
|
|
|
| PersistentNode* freeListNext() {
|
| - ASSERT(isUnused());
|
| + DCHECK(isUnused());
|
| PersistentNode* node = reinterpret_cast<PersistentNode*>(m_self);
|
| - ASSERT(!node || node->isUnused());
|
| + DCHECK(!node || node->isUnused());
|
| return node;
|
| }
|
|
|
| @@ -121,11 +121,11 @@ class PLATFORM_EXPORT PersistentRegion final {
|
| #endif
|
| if (UNLIKELY(!m_freeListHead))
|
| ensurePersistentNodeSlots(self, trace);
|
| - ASSERT(m_freeListHead);
|
| + DCHECK(m_freeListHead);
|
| PersistentNode* node = m_freeListHead;
|
| m_freeListHead = m_freeListHead->freeListNext();
|
| node->initialize(self, trace);
|
| - ASSERT(!node->isUnused());
|
| + DCHECK(!node->isUnused());
|
| return node;
|
| }
|
|
|
| @@ -214,7 +214,7 @@ class CrossThreadPersistentRegion final {
|
|
|
| void tracePersistentNodes(Visitor* visitor) {
|
| // If this assert triggers, you're tracing without being in a LockScope.
|
| -#if ENABLE(ASSERT)
|
| +#if DCHECK_IS_ON()
|
| DCHECK(m_mutex.locked());
|
| #endif
|
| m_persistentRegion->tracePersistentNodes(
|
|
|