Chromium Code Reviews| Index: Source/bindings/scripts/v8_interface.py |
| diff --git a/Source/bindings/scripts/v8_interface.py b/Source/bindings/scripts/v8_interface.py |
| index 1b061eb908170608b139bd5e5fa7a1c151cc3e6c..b3399e46e2094de428b6d31ea980de528b9dc505 100644 |
| --- a/Source/bindings/scripts/v8_interface.py |
| +++ b/Source/bindings/scripts/v8_interface.py |
| @@ -101,6 +101,19 @@ def interface_context(interface): |
| # [DependentLifetime] |
| is_dependent_lifetime = 'DependentLifetime' in extended_attributes |
| + # [Iterable] |
| + is_iterable = 'Iterable' in extended_attributes |
| + iterator_method = None |
| + if is_iterable: |
| + includes.add('bindings/core/v8/V8Iterator.h') |
|
Jens Widell
2014/08/21 13:58:01
Is this needed? I thought it was at first, but the
yhirano
2014/08/25 06:09:26
You're right, thanks!
|
| + iterator_operation = IdlOperation(interface.idl_name) |
| + iterator_operation.name = 'iterator' |
| + iterator_operation.idl_type = IdlType('Iterator') |
| + iterator_operation.extended_attributes['RaisesException'] = None |
| + iterator_operation.extended_attributes['CallWith'] = 'ScriptState' |
| + iterator_method = v8_methods.method_context(interface, |
| + iterator_operation) |
| + |
| # [MeasureAs] |
| is_measure_as = 'MeasureAs' in extended_attributes |
| if is_measure_as: |
| @@ -159,7 +172,9 @@ def interface_context(interface): |
| 'is_document': is_document, |
| 'is_event_target': inherits_interface(interface.name, 'EventTarget'), |
| 'is_exception': interface.is_exception, |
| + 'is_iterable': is_iterable, |
|
Jens Widell
2014/08/21 13:58:02
I'd slightly prefer if we dropped this and just us
yhirano
2014/08/25 06:09:26
Done.
|
| 'is_node': inherits_interface(interface.name, 'Node'), |
| + 'iterator_method': iterator_method, |
| 'measure_as': v8_utilities.measure_as(interface), # [MeasureAs] |
| 'parent_interface': parent_interface, |
| 'pass_cpp_type': cpp_template_type( |