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

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

Issue 2796253002: Associated Message Validation (Closed)
Patch Set: Validate payloadInterfaceIds before getting it. Use [0] for dimensions for validateArrayPointer. Ca… Created 3 years, 8 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 d4e15a7859607061dcaf9f7aa17eaaf596d02178..c9821d06009d5899d9dfc74669f738c1bdee4b30 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,14 @@ err = messageValidator.validateInterface({{offset}}, {{field|validate_nullable_p
// validate {{name}}
err = messageValidator.validateInterfaceRequest({{offset}}, {{field|validate_nullable_params}})
{{_check_err()}}
+{%- elif field|is_associated_interface_field %}
+// validate {{name}}
+err = messageValidator.validateAssociatedInterface({{offset}}, {{field|validate_nullable_params}});
+{{_check_err()}}
+{%- elif field|is_associated_interface_request_field %}
+// validate {{name}}
+err = messageValidator.validateAssociatedInterfaceRequest({{offset}}, {{field|validate_nullable_params}})
+{{_check_err()}}
{%- elif field|is_handle_field %}
// validate {{name}}
err = messageValidator.validateHandle({{offset}}, {{field|validate_nullable_params}})

Powered by Google App Engine
This is Rietveld 408576698