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

Unified Diff: Source/platform/heap/ThreadState.h

Issue 556823003: Revert "Revert of [oilpan]: optimize the way we allocate persistent handles in wrappers. (patchset … (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: review feedback Created 6 years, 3 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
« no previous file with comments | « Source/platform/heap/Handle.cpp ('k') | Source/platform/heap/ThreadState.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/heap/ThreadState.h
diff --git a/Source/platform/heap/ThreadState.h b/Source/platform/heap/ThreadState.h
index f8be43aba42d510bd6d352964412105c38067e25..53c0cd0966d49515658d45e0fabc745391f485d3 100644
--- a/Source/platform/heap/ThreadState.h
+++ b/Source/platform/heap/ThreadState.h
@@ -56,6 +56,7 @@ class HeapContainsCache;
class HeapObjectHeader;
class PageMemory;
class PersistentNode;
+class WrapperPersistentRegion;
class Visitor;
class SafePointBarrier;
class SafePointAwareMutexLocker;
@@ -546,6 +547,14 @@ public:
BaseHeapPage* contains(void* pointer) { return contains(reinterpret_cast<Address>(pointer)); }
BaseHeapPage* contains(const void* pointer) { return contains(const_cast<void*>(pointer)); }
+ WrapperPersistentRegion* wrapperRoots() const
+ {
+ ASSERT(m_liveWrapperPersistents);
+ return m_liveWrapperPersistents;
+ }
+ WrapperPersistentRegion* takeWrapperPersistentRegion();
+ void freeWrapperPersistentRegion(WrapperPersistentRegion*);
+
// List of persistent roots allocated on the given thread.
PersistentNode* roots() const { return m_persistents.get(); }
@@ -670,6 +679,9 @@ private:
static uint8_t s_mainThreadStateStorage[];
ThreadIdentifier m_thread;
+ WrapperPersistentRegion* m_liveWrapperPersistents;
+ WrapperPersistentRegion* m_pooledWrapperPersistents;
+ size_t m_pooledWrapperPersistentRegionCount;
OwnPtr<PersistentNode> m_persistents;
StackState m_stackState;
intptr_t* m_startOfStack;
« no previous file with comments | « Source/platform/heap/Handle.cpp ('k') | Source/platform/heap/ThreadState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698