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

Unified Diff: mojo/public/tools/bindings/generators/js_templates/validation_macros.tmpl

Issue 2394873003: [Mojo] Make javascript enums extensible. (Closed)
Patch Set: Created 4 years, 2 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: mojo/public/tools/bindings/generators/js_templates/validation_macros.tmpl
diff --git a/mojo/public/tools/bindings/generators/js_templates/validation_macros.tmpl b/mojo/public/tools/bindings/generators/js_templates/validation_macros.tmpl
index b632767c618a06af2cb665259d65f957262b15f9..3d0be6e95e334b97e3834b8d6e57baae9f5a9aa2 100644
--- a/mojo/public/tools/bindings/generators/js_templates/validation_macros.tmpl
+++ b/mojo/public/tools/bindings/generators/js_templates/validation_macros.tmpl
@@ -28,6 +28,10 @@ err = messageValidator.validateInterface({{offset}}, {{field|validate_interface_
// validate {{name}}
err = messageValidator.validateHandle({{offset}}, {{field|validate_handle_params}})
{{_check_err()}}
+{%- elif field|is_enum_field %}
+// validate {{name}}
+err = messageValidator.validateEnum({{offset}}, {{field|validate_enum_params}});
+{{_check_err()}}
{%- endif %}
{%- endmacro %}

Powered by Google App Engine
This is Rietveld 408576698