Index: third_party/WebKit/Source/platform/heap/Heap.cpp |
diff --git a/third_party/WebKit/Source/platform/heap/Heap.cpp b/third_party/WebKit/Source/platform/heap/Heap.cpp |
index 8a414e3ec0378d68a144275f1cf59b6561e47c60..9296517eb4a1431929802989b4ce27d19d487a20 100644 |
--- a/third_party/WebKit/Source/platform/heap/Heap.cpp |
+++ b/third_party/WebKit/Source/platform/heap/Heap.cpp |
@@ -158,10 +158,10 @@ void Heap::flushHeapDoesNotContainCache() |
void Heap::init() |
{ |
ThreadState::init(); |
- s_markingStack = new CallbackStack(); |
- s_postMarkingCallbackStack = new CallbackStack(); |
- s_globalWeakCallbackStack = new CallbackStack(); |
- s_ephemeronStack = new CallbackStack(); |
+ s_markingStack = new CallbackStack(4096); |
sof
2016/02/14 21:47:03
These are fairly arbitrary numbers, are they based
|
+ s_postMarkingCallbackStack = new CallbackStack(128); |
+ s_globalWeakCallbackStack = new CallbackStack(2048); |
+ s_ephemeronStack = new CallbackStack(128); |
s_heapDoesNotContainCache = new HeapDoesNotContainCache(); |
s_freePagePool = new FreePagePool(); |
s_orphanedPagePool = new OrphanedPagePool(); |
@@ -367,6 +367,11 @@ void Heap::postGC(BlinkGC::GCType gcType) |
ASSERT(ThreadState::current()->isInGC()); |
for (ThreadState* state : ThreadState::attachedThreads()) |
state->postGC(gcType); |
+ |
+ ASSERT(s_markingStack->isEmpty()); |
+ ASSERT(s_postMarkingCallbackStack->isEmpty()); |
+ ASSERT(s_globalWeakCallbackStack->isEmpty()); |
+ ASSERT(s_ephemeronStack->isEmpty()); |
} |
const char* Heap::gcReasonString(BlinkGC::GCReason reason) |