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

Unified Diff: third_party/WebKit/Source/platform/heap/PagePool.cpp

Issue 1892713003: Prepare for multiple ThreadHeaps (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 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/PagePool.cpp
diff --git a/third_party/WebKit/Source/platform/heap/PagePool.cpp b/third_party/WebKit/Source/platform/heap/PagePool.cpp
index da9e3fb59932f3ca5a1bf3521dd920b769305772..5b459c7cdfe8e6332340ee42c4dea41fcd7973e2 100644
--- a/third_party/WebKit/Source/platform/heap/PagePool.cpp
+++ b/third_party/WebKit/Source/platform/heap/PagePool.cpp
@@ -77,12 +77,7 @@ NO_SANITIZE_ADDRESS
void OrphanedPagePool::decommitOrphanedPages()
{
ASSERT(ThreadState::current()->isInGC());
-
-#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
+ ASSERT(ThreadState::current()->heap().isAtSafePoint());
for (int index = 0; index < BlinkGC::NumberOfArenas; ++index) {
PoolEntry* entry = m_pool[index];
@@ -101,7 +96,7 @@ void OrphanedPagePool::decommitOrphanedPages()
} else {
page->~BasePage();
clearMemory(memory);
- ThreadHeap::getFreePagePool()->addFreePage(index, memory);
+ ThreadHeap::mainThreadHeap()->getFreePagePool()->addFreePage(index, memory);
}
PoolEntry* deadEntry = entry;
« no previous file with comments | « third_party/WebKit/Source/platform/heap/MarkingVisitorImpl.h ('k') | third_party/WebKit/Source/platform/heap/SafePoint.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698