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

Issue 1387993002: mojo::Serialize*_() calls now propogate/return validation errors. (Closed)

Created:
5 years, 2 months ago by vardhan
Modified:
5 years, 2 months ago
Reviewers:
jamesr, viettrungluu
CC:
Aaron Boodman, abarth-chromium, azani_google, ben+mojo_chromium.org, darin (slow to review), gregsimon, mojo-reviews_chromium.org, qsr+mojo_chromium.org, rudominer1, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org
Base URL:
https://github.com/domokit/mojo.git@master
Target Ref:
refs/heads/master
Project:
mojo
Visibility:
Public.

Description

mojo::Serialize*_() calls now propogate/return validation errors. The public-facing API can use these, but will probably want to use a separate enum of errors (since ValidationError is namespace'd as internal, and should probably remain so). For now, a public serialization API can return a boolean. R=viettrungluu@chromium.org CC=jamesr@chromium.org BUG= Committed: https://chromium.googlesource.com/external/mojo/+/b993b3954683f57ef6eab999270509b47d40d1d9

Patch Set 1 #

Total comments: 18

Patch Set 2 : Cleaned up how serialization errors propagate, and addressed other comments from viettrungluu@ #

Total comments: 2

Patch Set 3 : unscope VALIDATION_ERROR_* enum values. early exit on null-input. additional comments #

Total comments: 26

Patch Set 4 : Fixed MOJO_DCHECK issues, removed SerializationWarningObserver & addressing trung's CL comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+405 lines, -256 lines) Patch
M mojo/public/cpp/bindings/lib/array_serialization.h View 1 2 3 8 chunks +124 lines, -82 lines 0 comments Download
M mojo/public/cpp/bindings/lib/control_message_handler.cc View 1 2 3 1 chunk +4 lines, -1 line 0 comments Download
M mojo/public/cpp/bindings/lib/control_message_proxy.cc View 1 2 3 2 chunks +6 lines, -2 lines 0 comments Download
M mojo/public/cpp/bindings/lib/map_serialization.h View 1 2 3 2 chunks +42 lines, -28 lines 0 comments Download
M mojo/public/cpp/bindings/lib/map_serialization_forward.h View 1 chunk +5 lines, -4 lines 0 comments Download
M mojo/public/cpp/bindings/lib/validation_errors.h View 1 2 3 1 chunk +5 lines, -37 lines 0 comments Download
M mojo/public/cpp/bindings/lib/validation_errors.cc View 1 2 3 2 chunks +0 lines, -23 lines 0 comments Download
M mojo/public/cpp/bindings/tests/array_unittest.cc View 1 2 5 chunks +10 lines, -5 lines 0 comments Download
M mojo/public/cpp/bindings/tests/map_unittest.cc View 1 2 2 chunks +4 lines, -2 lines 0 comments Download
M mojo/public/cpp/bindings/tests/serialization_warning_unittest.cc View 1 2 3 1 chunk +3 lines, -11 lines 0 comments Download
M mojo/public/cpp/bindings/tests/struct_unittest.cc View 1 2 6 chunks +11 lines, -5 lines 0 comments Download
M mojo/public/cpp/bindings/tests/union_unittest.cc View 1 2 7 chunks +14 lines, -7 lines 0 comments Download
M mojo/public/tools/bindings/generators/cpp_templates/interface_definition.tmpl View 1 chunk +1 line, -1 line 0 comments Download
M mojo/public/tools/bindings/generators/cpp_templates/struct_macros.tmpl View 1 2 4 chunks +127 lines, -23 lines 0 comments Download
M mojo/public/tools/bindings/generators/cpp_templates/struct_serialization_declaration.tmpl View 1 chunk +4 lines, -2 lines 0 comments Download
M mojo/public/tools/bindings/generators/cpp_templates/struct_serialization_definition.tmpl View 1 chunk +6 lines, -3 lines 0 comments Download
M mojo/public/tools/bindings/generators/cpp_templates/union_serialization_declaration.tmpl View 1 chunk +4 lines, -2 lines 0 comments Download
M mojo/public/tools/bindings/generators/cpp_templates/union_serialization_definition.tmpl View 1 2 5 chunks +35 lines, -18 lines 0 comments Download

Messages

Total messages: 10 (1 generated)
vardhan
5 years, 2 months ago (2015-10-06 00:22:49 UTC) #2
viettrungluu
https://codereview.chromium.org/1387993002/diff/1/mojo/public/cpp/bindings/lib/array_serialization.h File mojo/public/cpp/bindings/lib/array_serialization.h (right): https://codereview.chromium.org/1387993002/diff/1/mojo/public/cpp/bindings/lib/array_serialization.h#newcode61 mojo/public/cpp/bindings/lib/array_serialization.h:61: return ValidationError::VALIDATION_ERROR_NONE; Since ValidationError is (not yet!) a class ...
5 years, 2 months ago (2015-10-06 16:40:07 UTC) #3
vardhan
https://codereview.chromium.org/1387993002/diff/1/mojo/public/cpp/bindings/lib/array_serialization.h File mojo/public/cpp/bindings/lib/array_serialization.h (right): https://codereview.chromium.org/1387993002/diff/1/mojo/public/cpp/bindings/lib/array_serialization.h#newcode61 mojo/public/cpp/bindings/lib/array_serialization.h:61: return ValidationError::VALIDATION_ERROR_NONE; On 2015/10/06 at 16:40:06, viettrungluu wrote: > ...
5 years, 2 months ago (2015-10-06 22:57:14 UTC) #4
viettrungluu
(Still have to finish re-reviewing, but may as well send this now, since I don't ...
5 years, 2 months ago (2015-10-08 15:51:25 UTC) #5
vardhan
https://codereview.chromium.org/1387993002/diff/1/mojo/public/cpp/bindings/lib/array_serialization.h File mojo/public/cpp/bindings/lib/array_serialization.h (right): https://codereview.chromium.org/1387993002/diff/1/mojo/public/cpp/bindings/lib/array_serialization.h#newcode61 mojo/public/cpp/bindings/lib/array_serialization.h:61: return ValidationError::VALIDATION_ERROR_NONE; On 2015/10/08 at 15:51:25, viettrungluu wrote: > ...
5 years, 2 months ago (2015-10-08 20:53:51 UTC) #6
viettrungluu
https://codereview.chromium.org/1387993002/diff/40001/mojo/public/cpp/bindings/lib/array_serialization.h File mojo/public/cpp/bindings/lib/array_serialization.h (right): https://codereview.chromium.org/1387993002/diff/40001/mojo/public/cpp/bindings/lib/array_serialization.h#newcode373 mojo/public/cpp/bindings/lib/array_serialization.h:373: // It is up to the caller to make ...
5 years, 2 months ago (2015-10-09 01:35:20 UTC) #7
vardhan
https://codereview.chromium.org/1387993002/diff/40001/mojo/public/cpp/bindings/lib/array_serialization.h File mojo/public/cpp/bindings/lib/array_serialization.h (right): https://codereview.chromium.org/1387993002/diff/40001/mojo/public/cpp/bindings/lib/array_serialization.h#newcode373 mojo/public/cpp/bindings/lib/array_serialization.h:373: // It is up to the caller to make ...
5 years, 2 months ago (2015-10-09 22:31:29 UTC) #8
viettrungluu
lgtm
5 years, 2 months ago (2015-10-09 23:32:06 UTC) #9
vardhan
5 years, 2 months ago (2015-10-09 23:48:44 UTC) #10
Message was sent while issue was closed.
Committed patchset #4 (id:60001) manually as
b993b3954683f57ef6eab999270509b47d40d1d9 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698