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