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

Unified Diff: Source/bindings/core/v8/ScriptWrappable.h

Issue 720113003: bindings: Makes SVGAnimatedProperty ScriptWrappable. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Addressed review comments. Created 6 years, 1 month 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 | Source/core/svg/SVGAnimatedAngle.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/core/v8/ScriptWrappable.h
diff --git a/Source/bindings/core/v8/ScriptWrappable.h b/Source/bindings/core/v8/ScriptWrappable.h
index 1cefe36dd057810759b29241c6e2251806ae1796..0ef8e1c73bf7490f80211d4af68eb801cdc873ca 100644
--- a/Source/bindings/core/v8/ScriptWrappable.h
+++ b/Source/bindings/core/v8/ScriptWrappable.h
@@ -256,6 +256,25 @@ public: \
private: \
static const WrapperTypeInfo& s_wrapperTypeInfo
+// Defines 'wrapperTypeInfo' virtual method, which should never be called.
+//
+// This macro is used when there exists a class hierarchy with a root class
+// and most of the subclasses are script-wrappable but not all of them.
+// In that case, the root class can inherit from ScriptWrappable and use
+// this macro, and let subclasses have a choice whether or not use
+// DEFINE_WRAPPERTYPEINFO macro. The script-wrappable subclasses which have
+// corresponding IDL file must call DEFINE_WRAPPERTYPEINFO, and the others
+// must not.
+#define DEFINE_WRAPPERTYPEINFO_NOT_REACHED() \
+public: \
+ virtual const WrapperTypeInfo* wrapperTypeInfo() const override \
+ { \
+ ASSERT_NOT_REACHED(); \
+ return 0; \
+ } \
+private: \
+ typedef void end_of_define_wrappertypeinfo_not_reached_t
+
} // namespace blink
#endif // ScriptWrappable_h
« no previous file with comments | « no previous file | Source/core/svg/SVGAnimatedAngle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698