Index: mojo/public/tools/bindings/generators/cpp_templates/struct_macros.tmpl |
diff --git a/mojo/public/tools/bindings/generators/cpp_templates/struct_macros.tmpl b/mojo/public/tools/bindings/generators/cpp_templates/struct_macros.tmpl |
index 12e2dbba45b5128fd0bdaefd1eda4088fe1b640b..5ce9268e5f02abe14adde9915b57ea99b83b474a 100644 |
--- a/mojo/public/tools/bindings/generators/cpp_templates/struct_macros.tmpl |
+++ b/mojo/public/tools/bindings/generators/cpp_templates/struct_macros.tmpl |
@@ -17,8 +17,7 @@ |
{%- if kind|is_object_kind %} |
{%- set wrapper_type = kind|cpp_wrapper_type %} |
{%- if not kind|is_nullable_kind %} |
- if (mojo::internal::IsNonNullableValidationEnabled() && |
- !object->{{name}}.offset) { |
+ if (!object->{{name}}.offset) { |
ReportValidationError( |
mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER); |
return false; |
@@ -42,8 +41,7 @@ |
} |
{%- elif kind|is_any_handle_kind %} |
{%- if not kind|is_nullable_kind %} |
- if (mojo::internal::IsNonNullableValidationEnabled() && |
- object->{{name}}.value() == mojo::internal::kEncodedInvalidHandleValue) { |
+ if (object->{{name}}.value() == mojo::internal::kEncodedInvalidHandleValue) { |
ReportValidationError( |
mojo::internal::VALIDATION_ERROR_UNEXPECTED_INVALID_HANDLE); |
return false; |