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

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

Issue 1919773002: Revert of Prepare for multiple ThreadHeaps (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased 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 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;
« 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