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

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

Issue 483163003: Introduce ES6 iterator for DOM objects. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « Source/bindings/core/v8/V8DOMConfiguration.cpp ('k') | Source/bindings/templates/interface.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/scripts/v8_interface.py
diff --git a/Source/bindings/scripts/v8_interface.py b/Source/bindings/scripts/v8_interface.py
index bddc2c9a54d2d1b8ba1dd5aba3a9b41a600d02f8..120345dfe05e9204d6d39b04624264efc424d2fd 100644
--- a/Source/bindings/scripts/v8_interface.py
+++ b/Source/bindings/scripts/v8_interface.py
@@ -103,6 +103,17 @@ def interface_context(interface):
# [DependentLifetime]
is_dependent_lifetime = 'DependentLifetime' in extended_attributes
+ # [Iterable]
+ iterator_method = None
+ if 'Iterable' in extended_attributes:
+ 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:
@@ -172,6 +183,7 @@ def interface_context(interface):
'is_exception': interface.is_exception,
'is_node': inherits_interface(interface.name, 'Node'),
'is_script_wrappable': is_script_wrappable,
+ 'iterator_method': iterator_method,
'lifetime': 'Dependent'
if (has_visit_dom_wrapper or
is_active_dom_object or
« no previous file with comments | « Source/bindings/core/v8/V8DOMConfiguration.cpp ('k') | Source/bindings/templates/interface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698