| Index: third_party/WebKit/Source/platform/heap/PagePool.cpp
|
| diff --git a/third_party/WebKit/Source/platform/heap/PagePool.cpp b/third_party/WebKit/Source/platform/heap/PagePool.cpp
|
| index 5b459c7cdfe8e6332340ee42c4dea41fcd7973e2..da9e3fb59932f3ca5a1bf3521dd920b769305772 100644
|
| --- a/third_party/WebKit/Source/platform/heap/PagePool.cpp
|
| +++ b/third_party/WebKit/Source/platform/heap/PagePool.cpp
|
| @@ -77,7 +77,12 @@ NO_SANITIZE_ADDRESS
|
| void OrphanedPagePool::decommitOrphanedPages()
|
| {
|
| ASSERT(ThreadState::current()->isInGC());
|
| - ASSERT(ThreadState::current()->heap().isAtSafePoint());
|
| +
|
| +#if ENABLE(ASSERT)
|
| + // No locking needed as all threads are at safepoints at this point in time.
|
| + for (ThreadState* state : ThreadState::attachedThreads())
|
| + ASSERT(state->isAtSafePoint());
|
| +#endif
|
|
|
| for (int index = 0; index < BlinkGC::NumberOfArenas; ++index) {
|
| PoolEntry* entry = m_pool[index];
|
| @@ -96,7 +101,7 @@ void OrphanedPagePool::decommitOrphanedPages()
|
| } else {
|
| page->~BasePage();
|
| clearMemory(memory);
|
| - ThreadHeap::mainThreadHeap()->getFreePagePool()->addFreePage(index, memory);
|
| + ThreadHeap::getFreePagePool()->addFreePage(index, memory);
|
| }
|
|
|
| PoolEntry* deadEntry = entry;
|
|
|