Index: Source/bindings/templates/interface_base.cpp |
diff --git a/Source/bindings/templates/interface_base.cpp b/Source/bindings/templates/interface_base.cpp |
index 2f9ba99f0a8142b6d9598fc2e9af7b6f0fd7304b..cf3fc201e08e9e8a0919348b513bcb3ae6bc928e 100644 |
--- a/Source/bindings/templates/interface_base.cpp |
+++ b/Source/bindings/templates/interface_base.cpp |
@@ -23,16 +23,21 @@ namespace blink { |
if parent_interface else '0' %} |
{% set wrapper_type_prototype = 'WrapperTypeExceptionPrototype' if is_exception else |
'WrapperTypeObjectPrototype' %} |
+{% set dom_template = '%s::domTemplate' % v8_class if is_v8object else '0' %} |
-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}}, WrapperTypeInfo::{{wrapper_type_prototype}}, WrapperTypeInfo::{{wrapper_class_id}}, WrapperTypeInfo::{{lifetime}}, WrapperTypeInfo::{{gc_type}} }; |
+const WrapperTypeInfo {{v8_class}}::wrapperTypeInfo = { gin::kEmbedderBlink, {{dom_template}}, {{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}}, WrapperTypeInfo::{{wrapper_type_prototype}}, WrapperTypeInfo::{{wrapper_class_id}}, WrapperTypeInfo::{{lifetime}}, WrapperTypeInfo::{{gc_type}} }; |
{% if is_script_wrappable %} |
// This static member must be declared by DEFINE_WRAPPERTYPEINFO in {{cpp_class}}.h. |
// For details, see the comment of DEFINE_WRAPPERTYPEINFO in |
// bindings/core/v8/ScriptWrappable.h. |
+{% if is_typed_array_type %} |
+template<> |
+{% endif %} |
const WrapperTypeInfo& {{cpp_class}}::s_wrapperTypeInfo = {{v8_class}}::wrapperTypeInfo; |
{% endif %} |
+{% if is_v8object %} |
namespace {{cpp_class}}V8Internal { |
{# Constants #} |
@@ -213,6 +218,7 @@ static const V8DOMConfiguration::MethodConfiguration {{v8_class}}Methods[] = { |
{% endif %} |
{% endblock %} |
+{% endif %}{# is_v8object #} |
{##############################################################################} |
{% block named_constructor %}{% endblock %} |
{% block initialize_event %}{% endblock %} |
@@ -220,6 +226,7 @@ static const V8DOMConfiguration::MethodConfiguration {{v8_class}}Methods[] = { |
{% block configure_shadow_object_template %}{% endblock %} |
{##############################################################################} |
{% block install_dom_template %} |
+{% if is_v8object %} |
{% from 'methods.cpp' import install_custom_signature with context %} |
{% from 'constants.cpp' import install_constants with context %} |
static void install{{v8_class}}Template(v8::Handle<v8::FunctionTemplate> functionTemplate, v8::Isolate* isolate) |
@@ -384,10 +391,12 @@ static void install{{v8_class}}Template(v8::Handle<v8::FunctionTemplate> functio |
functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData::from(isolate)->toStringTemplate()); |
} |
+{% endif %}{# is_v8object #} |
{% endblock %} |
{##############################################################################} |
{% block get_dom_template %}{% endblock %} |
{% block has_instance %}{% endblock %} |
+{% block to_impl %}{% endblock %} |
{% block to_impl_with_type_check %}{% endblock %} |
{% block install_conditional_attributes %}{% endblock %} |
{% block install_conditional_methods %}{% endblock %} |