Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / web / WebHeap.cpp
index 2b261dc..8445c71 100644 (file)
 #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