Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(435)

Unified Diff: third_party/WebKit/Source/bindings/core/v8/ActiveScriptWrappable.h

Issue 2578193004: Remove ActiveScriptWrappableBase::m_scriptWrappable (Closed)
Patch Set: temp Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/core/v8/ActiveScriptWrappable.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..03ddf031309a70788908290e68be3faee1ca4ead 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() {}
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
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/core/v8/ActiveScriptWrappable.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698