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