| Index: third_party/WebKit/Source/platform/heap/GCInfo.cpp
|
| diff --git a/third_party/WebKit/Source/platform/heap/GCInfo.cpp b/third_party/WebKit/Source/platform/heap/GCInfo.cpp
|
| index 9092f7ec856326f4104163d60f0a5876fef1a97f..84d1a65da4b14370ab9af7157f573e72ebfa515f 100644
|
| --- a/third_party/WebKit/Source/platform/heap/GCInfo.cpp
|
| +++ b/third_party/WebKit/Source/platform/heap/GCInfo.cpp
|
| @@ -18,8 +18,8 @@ GCInfo const** s_gcInfoTable = nullptr;
|
|
|
| void GCInfoTable::ensureGCInfoIndex(const GCInfo* gcInfo,
|
| size_t* gcInfoIndexSlot) {
|
| - ASSERT(gcInfo);
|
| - ASSERT(gcInfoIndexSlot);
|
| + DCHECK(gcInfo);
|
| + DCHECK(gcInfoIndexSlot);
|
| // Keep a global GCInfoTable lock while allocating a new slot.
|
| DEFINE_THREAD_SAFE_STATIC_LOCAL(Mutex, mutex, new Mutex);
|
| MutexLocker locker(mutex);
|
| @@ -32,7 +32,7 @@ void GCInfoTable::ensureGCInfoIndex(const GCInfo* gcInfo,
|
|
|
| int index = ++s_gcInfoIndex;
|
| size_t gcInfoIndex = static_cast<size_t>(index);
|
| - RELEASE_ASSERT(gcInfoIndex < GCInfoTable::maxIndex);
|
| + CHECK(gcInfoIndex < gcInfoMaxIndex);
|
| if (gcInfoIndex >= s_gcInfoTableSize)
|
| resize();
|
|
|
| @@ -47,10 +47,10 @@ void GCInfoTable::resize() {
|
| const size_t initialSize = 512;
|
|
|
| size_t newSize = s_gcInfoTableSize ? 2 * s_gcInfoTableSize : initialSize;
|
| - ASSERT(newSize < GCInfoTable::maxIndex);
|
| + DCHECK_LT(newSize, gcInfoMaxIndex);
|
| s_gcInfoTable = reinterpret_cast<GCInfo const**>(WTF::Partitions::fastRealloc(
|
| s_gcInfoTable, newSize * sizeof(GCInfo), "GCInfo"));
|
| - ASSERT(s_gcInfoTable);
|
| + DCHECK(s_gcInfoTable);
|
| memset(reinterpret_cast<uint8_t*>(s_gcInfoTable) +
|
| s_gcInfoTableSize * sizeof(GCInfo),
|
| gcInfoZapValue, (newSize - s_gcInfoTableSize) * sizeof(GCInfo));
|
| @@ -58,7 +58,7 @@ void GCInfoTable::resize() {
|
| }
|
|
|
| void GCInfoTable::init() {
|
| - RELEASE_ASSERT(!s_gcInfoTable);
|
| + CHECK(!s_gcInfoTable);
|
| resize();
|
| }
|
|
|
| @@ -67,15 +67,15 @@ void GCInfoTable::shutdown() {
|
| s_gcInfoTable = nullptr;
|
| }
|
|
|
| -#if ENABLE(ASSERT)
|
| +#if DCHECK_IS_ON()
|
| void assertObjectHasGCInfo(const void* payload, size_t gcInfoIndex) {
|
| - ASSERT(HeapObjectHeader::fromPayload(payload)->checkHeader());
|
| + DCHECK(HeapObjectHeader::fromPayload(payload)->checkHeader());
|
| #if !defined(COMPONENT_BUILD)
|
| // On component builds we cannot compare the gcInfos as they are statically
|
| // defined in each of the components and hence will not match.
|
| BasePage* page = pageFromObject(payload);
|
| - ASSERT(!page->orphaned());
|
| - ASSERT(HeapObjectHeader::fromPayload(payload)->gcInfoIndex() == gcInfoIndex);
|
| + DCHECK(!page->orphaned());
|
| + DCHECK(HeapObjectHeader::fromPayload(payload)->gcInfoIndex() == gcInfoIndex);
|
| #endif
|
| }
|
| #endif
|
|
|