Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / core / dom / ActiveDOMObject.h
index 6adfb60..4690c91 100644 (file)
@@ -29,9 +29,8 @@
 
 #include "core/dom/ContextLifecycleObserver.h"
 #include "wtf/Assertions.h"
-#include "wtf/Forward.h"
 
-namespace WebCore {
+namespace blink {
 
 class ActiveDOMObject : public ContextLifecycleObserver {
 public:
@@ -40,15 +39,12 @@ public:
     // suspendIfNeeded() should be called exactly once after object construction to synchronize
     // the suspend state with that in ExecutionContext.
     void suspendIfNeeded();
-#if !ASSERT_DISABLED
+#if ENABLE(ASSERT)
     bool suspendIfNeededCalled() const { return m_suspendIfNeededCalled; }
 #endif
 
     // Should return true if there's any pending asynchronous activity, and so
     // this object must not be garbage collected.
-    //
-    // Default implementation is that it returns true iff
-    // m_pendingActivityCount is non-zero.
     virtual bool hasPendingActivity() const;
 
     // These methods have an empty default implementation so that subclasses
@@ -62,27 +58,12 @@ public:
 protected:
     virtual ~ActiveDOMObject();
 
-    template<class T> void setPendingActivity(T* thisObject)
-    {
-        ASSERT(thisObject == this);
-        thisObject->ref();
-        m_pendingActivityCount++;
-    }
-
-    template<class T> void unsetPendingActivity(T* thisObject)
-    {
-        ASSERT(m_pendingActivityCount > 0);
-        --m_pendingActivityCount;
-        thisObject->deref();
-    }
-
 private:
-    unsigned m_pendingActivityCount;
-#if !ASSERT_DISABLED
+#if ENABLE(ASSERT)
     bool m_suspendIfNeededCalled;
 #endif
 };
 
-} // namespace WebCore
+} // namespace blink
 
 #endif // ActiveDOMObject_h