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

Side by Side Diff: mojo/public/tools/bindings/generators/cpp_templates/validation_macros.tmpl

Issue 1410053006: Move third_party/mojo/src/mojo/public to mojo/public (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 5 years, 1 month 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 unified diff | Download patch
OLDNEW
1 {%- macro validate_not_null_ptr(field_expr, field, object_name) %} 1 {%- macro validate_not_null_ptr(field_expr, field, object_name) %}
2 if (!{{field_expr}}->offset) { 2 if (!{{field_expr}}->offset) {
3 ReportValidationError( 3 ReportValidationError(
4 mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER, 4 mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
5 "null {{field.name}} field in {{object_name}}"); 5 "null {{field.name}} field in {{object_name}}");
6 return false; 6 return false;
7 } 7 }
8 {%- endmacro %} 8 {%- endmacro %}
9 9
10 {%- macro validate_encoded_ptr(field_expr) %} 10 {%- macro validate_encoded_ptr(field_expr) %}
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 56
57 {%- if field.kind|is_array_kind or field.kind|is_string_kind -%} 57 {%- if field.kind|is_array_kind or field.kind|is_string_kind -%}
58 {{ validate_array_or_string(field_expr, field) }} 58 {{ validate_array_or_string(field_expr, field) }}
59 {%- endif %} 59 {%- endif %}
60 60
61 {%- if field.kind|is_any_handle_kind -%} 61 {%- if field.kind|is_any_handle_kind -%}
62 {{ validate_handle(field_expr, field, union.name) }} 62 {{ validate_handle(field_expr, field, union.name) }}
63 {%- endif %} 63 {%- endif %}
64 return true; 64 return true;
65 {%- endmacro %} 65 {%- endmacro %}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698