#include "config.h"
#include "public/web/WebHeap.h"
-#include "platform/heap/ThreadState.h"
+#include "platform/heap/Handle.h"
namespace blink {
-void WebHeap::attachThread()
+WebHeap::SafePointScope::SafePointScope()
{
- WebCore::ThreadState::attach();
+ ThreadState::current()->enterSafePointWithPointers(this);
}
-void WebHeap::detachThread()
+WebHeap::SafePointScope::~SafePointScope()
{
- WebCore::ThreadState::detach();
+ ThreadState::current()->leaveSafePoint();
}
-WebHeap::SafePointScope::SafePointScope()
+void WebHeap::collectGarbageForTesting()
{
- WebCore::ThreadState::current()->enterSafePointWithPointers(this);
+ Heap::collectGarbage(ThreadState::HeapPointersOnStack);
}
-WebHeap::SafePointScope::~SafePointScope()
+void WebHeap::collectAllGarbageForTesting()
{
- WebCore::ThreadState::current()->leaveSafePoint();
+ Heap::collectAllGarbage();
}
} // namespace blink