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

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

Issue 1047993002: bindings: Add validation for enum Sequence or Array (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 9 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/idl_types.py
diff --git a/Source/bindings/scripts/idl_types.py b/Source/bindings/scripts/idl_types.py
index e75123c55dc9bd7089e8dd0d0fab709267254d71..20038d341d9954859c45530c57863afb8d3efe06 100644
--- a/Source/bindings/scripts/idl_types.py
+++ b/Source/bindings/scripts/idl_types.py
@@ -180,7 +180,7 @@ class IdlType(IdlTypeBase):
@property
def enum_values(self):
- return IdlType.enums[self.name]
+ return IdlType.enums.get(self.name)
@property
def is_integer_type(self):
@@ -345,6 +345,10 @@ class IdlArrayOrSequenceType(IdlTypeBase):
def is_array_or_sequence_type(self):
return True
+ @property
+ def enum_values(self):
+ return self.element_type.enum_values
+
class IdlArrayType(IdlArrayOrSequenceType):
def __init__(self, element_type):

Powered by Google App Engine
This is Rietveld 408576698