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 b1c035cc51b9069d6c31f29de13d8d4a0e59ecd9..c44068b3756f3ada687e55f6f33ac912a7406f87 100644 |
--- a/third_party/WebKit/Source/platform/heap/Heap.cpp |
+++ b/third_party/WebKit/Source/platform/heap/Heap.cpp |
@@ -35,6 +35,7 @@ |
#include "platform/ScriptForbiddenScope.h" |
#include "platform/heap/BlinkGCMemoryDumpProvider.h" |
#include "platform/heap/CallbackStack.h" |
+#include "platform/heap/HeapCompact.h" |
#include "platform/heap/MarkingVisitor.h" |
#include "platform/heap/PageMemory.h" |
#include "platform/heap/PagePool.h" |
@@ -412,6 +413,25 @@ void ThreadHeap::commitCallbackStacks() { |
m_ephemeronStack->commit(); |
} |
+HeapCompact* ThreadHeap::compaction() { |
+ if (!m_compaction) |
+ m_compaction = HeapCompact::create(); |
+ return m_compaction.get(); |
+} |
+ |
+void ThreadHeap::registerMovingObjectReference(MovableReference* slot) { |
+ DCHECK(slot); |
+ DCHECK(*slot); |
+ compaction()->registerMovingObjectReference(slot); |
+} |
+ |
+void ThreadHeap::registerMovingObjectCallback(MovableReference reference, |
+ MovingObjectCallback callback, |
+ void* callbackData) { |
+ DCHECK(reference); |
+ compaction()->registerMovingObjectCallback(reference, callback, callbackData); |
+} |
+ |
void ThreadHeap::decommitCallbackStacks() { |
m_markingStack->decommit(); |
m_postMarkingCallbackStack->decommit(); |