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

Unified Diff: Source/bindings/dart/scripts/templates/methods_cpp.template

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 | « Source/bindings/dart/scripts/dart_utilities.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/dart/scripts/templates/methods_cpp.template
diff --git a/Source/bindings/dart/scripts/templates/methods_cpp.template b/Source/bindings/dart/scripts/templates/methods_cpp.template
index 75c15f5576480f88b4550d10bf045f634eaaafae..fcc061456e5aefb54e6078236812c63aa4510576 100644
--- a/Source/bindings/dart/scripts/templates/methods_cpp.template
+++ b/Source/bindings/dart/scripts/templates/methods_cpp.template
@@ -247,6 +247,11 @@ if (exception)
goto fail;
{% endif %}
{{argument.local_cpp_type}} {{argument.name}} = {{argument.dart_value_to_local_cpp_value}};
+{% if argument.enum_validation_expression %}
+if (!({{argument.enum_validation_expression}})) {
+ exception = Dart_NewStringFromCString("param {{argument.arg_index}} not valid");
+}
+{% endif %}
{% endif %}
{% endif %}{# argument.is_callback_interface #}
if (exception)
« no previous file with comments | « Source/bindings/dart/scripts/dart_utilities.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698