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

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

Issue 470063003: IDL: Use IdlArrayOrSequenceType for array/sequence IDL types (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@idl-extend-IdlTypeBase
Patch Set: 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/scripts/v8_attributes.py
diff --git a/Source/bindings/scripts/v8_attributes.py b/Source/bindings/scripts/v8_attributes.py
index 5464f017c667aba6ab3318fc39d5f409f290ec1d..597c152d9061418cb2f04307f68f594e033bba9d 100644
--- a/Source/bindings/scripts/v8_attributes.py
+++ b/Source/bindings/scripts/v8_attributes.py
@@ -140,7 +140,7 @@ def attribute_context(interface, attribute):
'runtime_enabled_function': v8_utilities.runtime_enabled_function_name(attribute), # [RuntimeEnabled]
'setter_callback': setter_callback_name(interface, attribute),
'should_be_exposed_to_script': not (is_implemented_in_private_script and is_only_exposed_to_private_script),
- 'v8_type': v8_types.v8_type(base_idl_type),
+ 'v8_type': v8_types.v8_type(base_idl_type) if idl_type.is_interface_type else None,
Nils Barth (inactive) 2014/08/14 14:24:44 Is this worth taking onto IdlType(Base)? IdlType(B
Jens Widell 2014/08/14 15:02:55 Can't think of a reason not to. :-)
'world_suffixes': ['', 'ForMainWorld']
if 'PerWorldBindings' in extended_attributes
else [''], # [PerWorldBindings]
@@ -375,7 +375,7 @@ def setter_expression(interface, attribute, context):
arguments.append('V8EventListenerList::findOrCreateWrapper<V8ErrorHandler>(v8Value, true, ScriptState::current(info.GetIsolate()))')
else:
arguments.append('V8EventListenerList::getEventListener(ScriptState::current(info.GetIsolate()), v8Value, true, ListenerFindOrCreate)')
- elif idl_type.is_interface_type and not idl_type.array_element_type:
+ elif idl_type.is_interface_type:
# FIXME: should be able to eliminate WTF::getPtr in most or all cases
arguments.append('WTF::getPtr(cppValue)')
else:
@@ -496,7 +496,7 @@ idl_types.IdlType.constructor_type_name = property(
def is_constructor_attribute(attribute):
# FIXME: replace this with [ConstructorAttribute] extended attribute
- return attribute.idl_type.base_type.endswith('Constructor')
+ return attribute.idl_type.name.endswith('Constructor')
Jens Widell 2014/08/14 13:56:50 Changed since base_type is sometimes None (more of
Nils Barth (inactive) 2014/08/14 14:24:44 Acknowledged; [ConstructorAttribute] is another lo
def constructor_getter_context(interface, attribute, context):

Powered by Google App Engine
This is Rietveld 408576698