Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / web / WebHeap.cpp
index 65bfb60..f7afef6 100644 (file)
 #include "config.h"
 #include "WebHeap.h"
 
-#if ENABLE(OILPAN)
 #include "heap/ThreadState.h"
-#endif
 
 namespace blink {
 
-void WebHeap::enterSafePoint()
+void WebHeap::attachThread()
 {
-#if ENABLE(OILPAN)
-    WebCore::ThreadState::current()->enterSafePointWithoutPointers();
-#endif
+    WebCore::ThreadState::attach();
 }
 
-void WebHeap::leaveSafePoint()
+void WebHeap::detachThread()
 {
-#if ENABLE(OILPAN)
-    WebCore::ThreadState::current()->leaveSafePoint();
-#endif
+    WebCore::ThreadState::detach();
 }
 
-void WebHeap::attachThread()
+WebHeap::SafePointScope::SafePointScope()
 {
-#if ENABLE(OILPAN)
-    WebCore::ThreadState::attach();
-#endif
+    WebCore::ThreadState::current()->enterSafePointWithPointers(this);
 }
 
-void WebHeap::detachThread()
+WebHeap::SafePointScope::~SafePointScope()
 {
-#if ENABLE(OILPAN)
-    WebCore::ThreadState::detach();
-#endif
+    WebCore::ThreadState::current()->leaveSafePoint();
 }
 
 } // namespace blink