| 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 eed2697b77f65c834c1b126ac137bb15a1f228bd..97b11121b20e86612ec9f0372041c5b271146f78 100644
|
| --- a/third_party/WebKit/Source/platform/heap/Heap.cpp
|
| +++ b/third_party/WebKit/Source/platform/heap/Heap.cpp
|
| @@ -304,6 +304,14 @@ bool Heap::weakTableRegistered(const void* table)
|
| }
|
| #endif
|
|
|
| +void Heap::decommitCallbackStacks()
|
| +{
|
| + s_markingStack->decommit();
|
| + s_postMarkingCallbackStack->decommit();
|
| + s_globalWeakCallbackStack->decommit();
|
| + s_ephemeronStack->decommit();
|
| +}
|
| +
|
| void Heap::preGC()
|
| {
|
| ASSERT(!ThreadState::current()->isInGC());
|
| @@ -420,6 +428,7 @@ void Heap::collectGarbage(BlinkGC::StackState stackState, BlinkGC::GCType gcType
|
| WTF::Partitions::reportMemoryUsageHistogram();
|
|
|
| postGC(gcType);
|
| + Heap::decommitCallbackStacks();
|
|
|
| #if ENABLE(ASSERT)
|
| // 0 is used to figure non-assigned area, so avoid to use 0 in s_gcGeneration.
|
| @@ -462,6 +471,7 @@ void Heap::collectGarbageForTerminatingThread(ThreadState* state)
|
| globalWeakProcessing(visitorScope.visitor());
|
|
|
| state->postGC(BlinkGC::GCWithSweep);
|
| + Heap::decommitCallbackStacks();
|
| }
|
| state->preSweep();
|
| }
|
| @@ -498,8 +508,6 @@ void Heap::postMarkingProcessing(Visitor* visitor)
|
| // if they are only reachable from their front objects.
|
| while (popAndInvokePostMarkingCallback(visitor)) { }
|
|
|
| - s_ephemeronStack->clear();
|
| -
|
| // Post-marking callbacks should not trace any objects and
|
| // therefore the marking stack should be empty after the
|
| // post-marking callbacks.
|
|
|