Chromium Code Reviews| Index: third_party/WebKit/Source/bindings/core/v8/ActiveScriptWrappable.h |
| diff --git a/third_party/WebKit/Source/bindings/core/v8/ActiveScriptWrappable.h b/third_party/WebKit/Source/bindings/core/v8/ActiveScriptWrappable.h |
| index 68d41787ddc5e1a9d633a37a114906aac2c41991..2e5a0891339a86c365da355ee4b855f8f4195336 100644 |
| --- a/third_party/WebKit/Source/bindings/core/v8/ActiveScriptWrappable.h |
| +++ b/third_party/WebKit/Source/bindings/core/v8/ActiveScriptWrappable.h |
| @@ -27,18 +27,16 @@ class CORE_EXPORT ActiveScriptWrappableBase : public GarbageCollectedMixin { |
| WTF_MAKE_NONCOPYABLE(ActiveScriptWrappableBase); |
| public: |
| - explicit ActiveScriptWrappableBase(ScriptWrappable*); |
| + ActiveScriptWrappableBase(); |
| static void traceActiveScriptWrappables(v8::Isolate*, |
| ScriptWrappableVisitor*); |
| protected: |
| virtual bool isContextDestroyed(ActiveScriptWrappableBase*) const = 0; |
| - |
| - private: |
| - ScriptWrappable* toScriptWrappable() const { return m_scriptWrappable; } |
| - |
| - ScriptWrappable* m_scriptWrappable; |
| + virtual bool dispatchHasPendingActivity(ActiveScriptWrappableBase*) const = 0; |
| + virtual ScriptWrappable* toScriptWrappable( |
| + ActiveScriptWrappableBase*) const = 0; |
| }; |
| template <typename T> |
| @@ -46,8 +44,7 @@ class ActiveScriptWrappable : public ActiveScriptWrappableBase { |
| WTF_MAKE_NONCOPYABLE(ActiveScriptWrappable); |
| public: |
| - explicit ActiveScriptWrappable(ScriptWrappable* wrappable) |
| - : ActiveScriptWrappableBase(wrappable) {} |
| + ActiveScriptWrappable() : ActiveScriptWrappableBase() {} |
|
sof
2016/12/16 06:36:23
can be removed.
|
| protected: |
| bool isContextDestroyed(ActiveScriptWrappableBase* object) const final { |
| @@ -55,6 +52,16 @@ class ActiveScriptWrappable : public ActiveScriptWrappableBase { |
| (static_cast<T*>(object)->T::getExecutionContext)() |
| ->isContextDestroyed(); |
| } |
| + |
| + bool dispatchHasPendingActivity( |
| + ActiveScriptWrappableBase* object) const final { |
| + return static_cast<T*>(object)->T::hasPendingActivity(); |
| + } |
| + |
| + ScriptWrappable* toScriptWrappable( |
| + ActiveScriptWrappableBase* object) const final { |
| + return static_cast<T*>(object); |
| + } |
| }; |
| } // namespace blink |