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

Unified Diff: Source/bindings/templates/interface_base.cpp

Issue 478243002: bindings: Adds virtual ScriptWrappable::wrap method. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Synced and sent out to the code review. Created 6 years, 4 months 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
Index: Source/bindings/templates/interface_base.cpp
diff --git a/Source/bindings/templates/interface_base.cpp b/Source/bindings/templates/interface_base.cpp
index 110312ac1be85daf2bf9e5bc1da576faf8272ed2..bac0261b3f250ac9c36a8d1c81aa3296c1d5beb5 100644
--- a/Source/bindings/templates/interface_base.cpp
+++ b/Source/bindings/templates/interface_base.cpp
@@ -50,6 +50,16 @@ namespace blink {
const WrapperTypeInfo {{v8_class}}::wrapperTypeInfo = { gin::kEmbedderBlink, {{v8_class}}::domTemplate, {{v8_class}}::refObject, {{v8_class}}::derefObject, {{v8_class}}::createPersistentHandle, {{to_active_dom_object}}, {{to_event_target}}, {{visit_dom_wrapper}}, {{v8_class}}::installConditionallyEnabledMethods, {{v8_class}}::installConditionallyEnabledProperties, {{parent_wrapper_type_info}}, {{wrapper_type_prototype}}, {{gc_type}} };
+{% if is_script_wrappable %}
+// The definition of {{cpp_class}}'s WrapperTypeInfo. If {{cpp_class}} inherits
+// from ScriptWrappable, you have to write DEFINE_WRAPPERTYPEINFO macro in the
+// class definition. Otherwise, you have to write NotScriptWrappable in the IDL
haraken 2014/08/29 05:24:04 NotScriptWrappable => [NotScriptWrappable]
Yuki 2014/09/01 06:06:39 Done.
+// file as an extended attribute in order to let IDL compiler know that
+// {{cpp_class}} doesn't inherit from ScriptWrappable. Note that
+// NotScriptWrappable is inheritable.
haraken 2014/08/29 05:24:04 Ditto.
Yuki 2014/09/01 06:06:39 Done.
+const WrapperTypeInfo& {{cpp_class}}::s_wrapperTypeInfo = {{v8_class}}::wrapperTypeInfo;
+
+{% endif %}
namespace {{cpp_class}}V8Internal {
template <typename T> void V8_USE(T) { }

Powered by Google App Engine
This is Rietveld 408576698