| Index: Source/bindings/dart/scripts/dart_utilities.py
|
| diff --git a/Source/bindings/dart/scripts/dart_utilities.py b/Source/bindings/dart/scripts/dart_utilities.py
|
| index 3bd0554d07418fba94de8f308a57f28e37fc948e..c9f4fa58a5245edbb4130882e999d6f61c249ebb 100644
|
| --- a/Source/bindings/dart/scripts/dart_utilities.py
|
| +++ b/Source/bindings/dart/scripts/dart_utilities.py
|
| @@ -44,6 +44,14 @@ import v8_types # Required
|
| import v8_utilities
|
|
|
|
|
| +def _enum_validation_expression(idl_type):
|
| + # FIXME: Add IdlEnumType, move property to derived type, and remove this check
|
| + if not idl_type.is_enum:
|
| + return None
|
| + return ' || '.join(['((String){param_name}) == "%s"' % enum_value
|
| + for enum_value in idl_type.enum_values])
|
| +
|
| +
|
| def _scoped_name(interface, definition, base_name):
|
| # partial interfaces are implemented as separate classes, with their members
|
| # implemented as static member functions
|
| @@ -184,7 +192,7 @@ DartUtilities.conditional_string = v8_utilities.conditional_string
|
| DartUtilities.cpp_name = v8_utilities.cpp_name
|
| DartUtilities.deprecate_as = _deprecate_as
|
| DartUtilities.extended_attribute_value_contains = v8_utilities.extended_attribute_value_contains
|
| -DartUtilities.enum_validation_expression = v8_utilities.enum_validation_expression
|
| +DartUtilities.enum_validation_expression = _enum_validation_expression
|
| DartUtilities.gc_type = v8_utilities.gc_type
|
| DartUtilities.generate_native_entry = _generate_native_entry
|
| DartUtilities.has_extended_attribute = v8_utilities.has_extended_attribute
|
|
|