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

Unified Diff: third_party/WebKit/Source/bindings/scripts/v8_attributes.py

Issue 2647643002: Fix V8 bindings for named constructors to set prototype object correctly (Closed)
Patch Set: Created 3 years, 11 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: third_party/WebKit/Source/bindings/scripts/v8_attributes.py
diff --git a/third_party/WebKit/Source/bindings/scripts/v8_attributes.py b/third_party/WebKit/Source/bindings/scripts/v8_attributes.py
index 006bc6c2f922a7704e40d6a53df32e2bb9a2f4dd..d12a53c62e2f74635b89165ff155a55b894276ff 100644
--- a/third_party/WebKit/Source/bindings/scripts/v8_attributes.py
+++ b/third_party/WebKit/Source/bindings/scripts/v8_attributes.py
@@ -156,6 +156,7 @@ def attribute_context(interface, attribute, interfaces):
'is_lenient_this': 'LenientThis' in extended_attributes,
'is_nullable': idl_type.is_nullable,
'is_explicit_nullable': idl_type.is_explicit_nullable,
+ 'is_named_constructor': is_named_constructor_attribute(attribute),
'is_partial_interface_member':
'PartialInterfaceImplementedAs' in extended_attributes,
'is_per_world_bindings': 'PerWorldBindings' in extended_attributes,
@@ -571,5 +572,10 @@ def is_constructor_attribute(attribute):
return attribute.idl_type.name.endswith('Constructor')
+def is_named_constructor_attribute(attribute):
+ # FIXME: replace this with [NamedConstructor] extended attribute
Yuki 2017/01/19 09:57:28 nit: FIXME is an old style in WebKit era, and we'r
bashi 2017/01/19 09:58:01 Can we remove this comment? I think FIXME comments
Yuki 2017/01/19 10:09:30 I'm fine to remove the comment.
sashab 2017/01/20 04:37:05 Removed all 3 comments on lines 571, 566 and new a
+ return attribute.idl_type.name.endswith('ConstructorConstructor')
+
+
def update_constructor_attribute_context(interface, attribute, context):
context['needs_constructor_getter_callback'] = context['measure_as'] or context['deprecate_as']

Powered by Google App Engine
This is Rietveld 408576698