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

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

Issue 1477023003: Refactor the Heap into ThreadHeap to prepare for per thread heaps Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 acb5fa3b3f56ad8dcb7187773a442e96d4b34fca..58a1dc618b39478a6553977ec5c723d2c553b886 100644
--- a/third_party/WebKit/Source/platform/heap/PagePool.cpp
+++ b/third_party/WebKit/Source/platform/heap/PagePool.cpp
@@ -80,8 +80,7 @@ void OrphanedPagePool::decommitOrphanedPages()
#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());
+ ASSERT(ThreadState::current()->heap().isAtSafePoint());
#endif
for (int index = 0; index < BlinkGC::NumberOfArenas; ++index) {
@@ -101,7 +100,7 @@ void OrphanedPagePool::decommitOrphanedPages()
} else {
page->~BasePage();
clearMemory(memory);
- Heap::getFreePagePool()->addFreePage(index, memory);
+ ThreadState::mainThreadState()->heap().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/RunAllTests.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698