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

Unified Diff: mojo/public/cpp/bindings/lib/array_internal.h

Issue 488123003: Mojo cpp bindings: remove IsNonNullableValidationEnabled() check (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 | « no previous file | mojo/public/cpp/bindings/lib/array_serialization.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/cpp/bindings/lib/array_internal.h
diff --git a/mojo/public/cpp/bindings/lib/array_internal.h b/mojo/public/cpp/bindings/lib/array_internal.h
index a4e36a7caad28203819f596e580a5953aa60ad34..a047db26e0bb87a9018018d5a6ef0ce5ba74da0f 100644
--- a/mojo/public/cpp/bindings/lib/array_internal.h
+++ b/mojo/public/cpp/bindings/lib/array_internal.h
@@ -206,7 +206,7 @@ struct ArraySerializationHelper<Handle, true> {
Handle_type_should_not_have_array_validate_params);
for (uint32_t i = 0; i < header->num_elements; ++i) {
- if (IsNonNullableValidationEnabled() && !element_is_nullable &&
+ if (!element_is_nullable &&
elements[i].value() == kEncodedInvalidHandleValue) {
ReportValidationError(VALIDATION_ERROR_UNEXPECTED_INVALID_HANDLE);
return false;
@@ -271,8 +271,7 @@ struct ArraySerializationHelper<P*, false> {
const ElementType* elements,
BoundsChecker* bounds_checker) {
for (uint32_t i = 0; i < header->num_elements; ++i) {
- if (IsNonNullableValidationEnabled() && !element_is_nullable &&
- !elements[i].offset) {
+ if (!element_is_nullable && !elements[i].offset) {
ReportValidationError(VALIDATION_ERROR_UNEXPECTED_NULL_POINTER);
return false;
}
« no previous file with comments | « no previous file | mojo/public/cpp/bindings/lib/array_serialization.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698