Index: third_party/WebKit/Source/bindings/templates/attributes.cpp.tmpl |
diff --git a/third_party/WebKit/Source/bindings/templates/attributes.cpp.tmpl b/third_party/WebKit/Source/bindings/templates/attributes.cpp.tmpl |
index bfa875a0981baab255ebb5ccf8edc877c3d974da..aa40c0c72fa487cab44e35b8ea1649dfd29a36da 100644 |
--- a/third_party/WebKit/Source/bindings/templates/attributes.cpp.tmpl |
+++ b/third_party/WebKit/Source/bindings/templates/attributes.cpp.tmpl |
@@ -426,7 +426,9 @@ const v8::FunctionCallbackInfo<v8::Value>& info |
{% set getter_callback = |
'%sV8Internal::%sConstructorGetterCallback' % (cpp_class_or_partial, attribute.name) |
if attribute.needs_constructor_getter_callback else |
haraken
2017/01/25 03:37:16
Can you clean up the if-else clause? If-else-if-el
sashab
2017/01/25 04:54:15
Changed to actual {% if %} and {% else %} statemen
|
- 'v8ConstructorAttributeGetter' %} |
+ ('V8%s::NamedConstructorAttributeGetter' % (attribute.constructor_type) |
+ if attribute.is_named_constructor else |
+ 'v8ConstructorAttributeGetter') %} |
{% set setter_callback = '0' %} |
{% else %}{# regular attributes #} |
{% set getter_callback = '%sV8Internal::%sAttributeGetterCallback' % |
@@ -444,7 +446,7 @@ const v8::FunctionCallbackInfo<v8::Value>& info |
{% set wrapper_type_info = |
'const_cast<WrapperTypeInfo*>(&V8%s::wrapperTypeInfo)' % |
attribute.constructor_type |
- if attribute.constructor_type else '0' %} |
+ if attribute.constructor_type and not attribute.is_named_constructor else '0' %} |
haraken
2017/01/25 03:37:16
Is this change needed?
sashab
2017/01/25 04:54:15
Nit suggested by yuki: "Since you no longer need |
|
{% set property_attribute = 'static_cast<v8::PropertyAttribute>(%s)' % |
' | '.join(attribute.property_attributes) %} |
{% set cached_accessor_callback = |