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

Unified Diff: Source/bindings/dart/scripts/dart_dictionary.py

Issue 906343002: Added enum checks since enums are now supported in the IDL (Closed) Base URL: svn://svn.chromium.org/blink/branches/dart/dartium
Patch Set: Created 5 years, 10 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 | « no previous file | Source/bindings/dart/scripts/dart_methods.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/dart/scripts/dart_dictionary.py
diff --git a/Source/bindings/dart/scripts/dart_dictionary.py b/Source/bindings/dart/scripts/dart_dictionary.py
index 705a50adf9fe630bdba5ea78e13711f72ff3eaf7..42a21ba1725b0a15f10969b1d5c20094daee82b7 100644
--- a/Source/bindings/dart/scripts/dart_dictionary.py
+++ b/Source/bindings/dart/scripts/dart_dictionary.py
@@ -72,6 +72,10 @@ def member_context(member):
cpp_default_value, dart_default_value = default_values()
+ dart_enum_expression = idl_type.enum_validation_expression
+ if dart_enum_expression:
+ dart_enum_expression = dart_enum_expression.format(param_name='string')
+
return {
'cpp_default_value': cpp_default_value,
'cpp_type': idl_type.cpp_type,
@@ -79,7 +83,7 @@ def member_context(member):
cpp_value='impl->%s()' % member.name,
creation_context='creationContext',
extended_attributes=member.extended_attributes),
- 'enum_validation_expression': idl_type.enum_validation_expression,
+ 'enum_validation_expression': dart_enum_expression,
'has_method_name': has_method_name_for_dictionary_member(member),
'is_object': idl_type.name == 'Object',
'name': member.name,
« no previous file with comments | « no previous file | Source/bindings/dart/scripts/dart_methods.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698