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

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

Issue 807263007: IDL: Add forEach() method to iterable<>/maplike<>/setlike<> interfaces (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: adjust test expectations Created 5 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
« no previous file with comments | « LayoutTests/webmidi/requestmidiaccess-expected.txt ('k') | Source/bindings/scripts/v8_interface.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/scripts/idl_definitions.py
diff --git a/Source/bindings/scripts/idl_definitions.py b/Source/bindings/scripts/idl_definitions.py
index 15652e07d3d0b2f7a1dd3bbab2725657484c96d3..cc22302035741e2da27466266366c4436e584694 100644
--- a/Source/bindings/scripts/idl_definitions.py
+++ b/Source/bindings/scripts/idl_definitions.py
@@ -505,11 +505,12 @@ class IdlOperation(TypedObject):
self.extended_attributes = {}
self.specials = []
self.is_constructor = False
+ self.idl_name = idl_name
+ self.is_static = False
if not node:
- self.is_static = False
return
- self.idl_name = idl_name
+
self.name = node.GetName() # FIXME: should just be: or ''
# FIXME: AST should use None internally
if self.name == '_unnamed_':
@@ -574,15 +575,20 @@ class IdlOperation(TypedObject):
################################################################################
class IdlArgument(TypedObject):
- def __init__(self, idl_name, node):
+ def __init__(self, idl_name, node=None):
self.extended_attributes = {}
self.idl_type = None
- self.is_optional = node.GetProperty('OPTIONAL') # syntax: (optional T)
+ self.is_optional = False # syntax: (optional T)
self.is_variadic = False # syntax: (T...)
self.idl_name = idl_name
- self.name = node.GetName()
self.default_value = None
+ if not node:
+ return
+
+ self.is_optional = node.GetProperty('OPTIONAL')
+ self.name = node.GetName()
+
children = node.GetChildren()
for child in children:
child_class = child.GetClass()
« no previous file with comments | « LayoutTests/webmidi/requestmidiaccess-expected.txt ('k') | Source/bindings/scripts/v8_interface.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698