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

Issue 2064903002: Mojo: Report bindings validation errors via MojoNotifyBadMessage (Closed)

Created:
4 years, 6 months ago by Ken Rockot(use gerrit already)
Modified:
4 years, 6 months ago
Reviewers:
yzshen1
CC:
Aaron Boodman, abarth-chromium, ben+mojo_chromium.org, chromium-reviews, darin (slow to review), qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Mojo: Report bindings validation errors via MojoNotifyBadMessage Renames BoundsChecker to ValidationContext. Plumbs a ValidationContext through to any code which might report a message validation error. Calls NotifyBadMessage from ReportValidationError so that all such errors may be bubbled up to the embedder through the EDK. R=yzshen@chromium.org BUG=607293 Committed: https://crrev.com/8a88e80c4bea32f83842729d33db85a36ef5b3fa Cr-Commit-Position: refs/heads/master@{#400075}

Patch Set 1 #

Total comments: 8

Patch Set 2 : . #

Total comments: 7

Patch Set 3 #

Patch Set 4 : . #

Total comments: 6

Patch Set 5 : . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+737 lines, -645 lines) Patch
M mojo/mojo_edk_tests.gyp View 1 2 2 chunks +1 line, -1 line 0 comments Download
M mojo/mojo_public.gypi View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M mojo/public/cpp/bindings/BUILD.gn View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M mojo/public/cpp/bindings/lib/array_internal.h View 1 2 13 chunks +35 lines, -25 lines 0 comments Download
M mojo/public/cpp/bindings/lib/binding_state.h View 1 2 2 chunks +2 lines, -1 line 0 comments Download
D mojo/public/cpp/bindings/lib/bounds_checker.h View 1 2 1 chunk +0 lines, -65 lines 0 comments Download
D mojo/public/cpp/bindings/lib/bounds_checker.cc View 1 2 1 chunk +0 lines, -80 lines 0 comments Download
M mojo/public/cpp/bindings/lib/filter_chain.h View 1 2 3 chunks +6 lines, -5 lines 0 comments Download
M mojo/public/cpp/bindings/lib/interface_ptr_state.h View 1 2 2 chunks +2 lines, -1 line 0 comments Download
M mojo/public/cpp/bindings/lib/map_data_internal.h View 1 2 2 chunks +16 lines, -10 lines 0 comments Download
M mojo/public/cpp/bindings/lib/message.cc View 1 2 2 chunks +5 lines, -0 lines 0 comments Download
M mojo/public/cpp/bindings/lib/message_buffer.h View 1 chunk +2 lines, -0 lines 0 comments Download
M mojo/public/cpp/bindings/lib/message_buffer.cc View 1 chunk +6 lines, -0 lines 0 comments Download
M mojo/public/cpp/bindings/lib/message_header_validator.h View 1 2 1 chunk +9 lines, -0 lines 0 comments Download
M mojo/public/cpp/bindings/lib/message_header_validator.cc View 1 2 4 chunks +26 lines, -11 lines 0 comments Download
M mojo/public/cpp/bindings/lib/multiplex_router.h View 1 2 2 chunks +5 lines, -0 lines 0 comments Download
M mojo/public/cpp/bindings/lib/multiplex_router.cc View 1 2 1 chunk +7 lines, -0 lines 0 comments Download
M mojo/public/cpp/bindings/lib/native_enum_data.h View 1 2 1 chunk +4 lines, -1 line 0 comments Download
M mojo/public/cpp/bindings/lib/native_struct_data.h View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M mojo/public/cpp/bindings/lib/native_struct_data.cc View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
M mojo/public/cpp/bindings/lib/pipe_control_message_handler.h View 1 2 2 chunks +6 lines, -1 line 0 comments Download
M mojo/public/cpp/bindings/lib/pipe_control_message_handler.cc View 1 2 3 chunks +12 lines, -3 lines 0 comments Download
M mojo/public/cpp/bindings/lib/validate_params.h View 1 2 1 chunk +3 lines, -1 line 0 comments Download
A + mojo/public/cpp/bindings/lib/validation_context.h View 1 2 3 chunks +27 lines, -10 lines 0 comments Download
A + mojo/public/cpp/bindings/lib/validation_context.cc View 1 2 4 chunks +17 lines, -11 lines 0 comments Download
M mojo/public/cpp/bindings/lib/validation_errors.h View 1 2 3 4 2 chunks +7 lines, -2 lines 0 comments Download
M mojo/public/cpp/bindings/lib/validation_errors.cc View 1 2 3 4 2 chunks +24 lines, -2 lines 0 comments Download
M mojo/public/cpp/bindings/lib/validation_util.h View 1 2 2 chunks +56 lines, -36 lines 0 comments Download
M mojo/public/cpp/bindings/lib/validation_util.cc View 1 2 3 chunks +62 lines, -34 lines 0 comments Download
M mojo/public/cpp/bindings/message.h View 1 2 3 2 chunks +5 lines, -0 lines 0 comments Download
M mojo/public/cpp/bindings/tests/BUILD.gn View 1 2 2 chunks +1 line, -1 line 0 comments Download
D mojo/public/cpp/bindings/tests/bounds_checker_unittest.cc View 1 2 1 chunk +0 lines, -214 lines 0 comments Download
M mojo/public/cpp/bindings/tests/union_unittest.cc View 1 2 25 chunks +88 lines, -83 lines 0 comments Download
A mojo/public/cpp/bindings/tests/validation_context_unittest.cc View 1 2 1 chunk +214 lines, -0 lines 0 comments Download
M mojo/public/tools/bindings/generators/cpp_templates/enum_macros.tmpl View 1 2 1 chunk +4 lines, -2 lines 0 comments Download
M mojo/public/tools/bindings/generators/cpp_templates/interface_definition.tmpl View 1 2 3 4 11 chunks +42 lines, -13 lines 0 comments Download
M mojo/public/tools/bindings/generators/cpp_templates/module-internal.h.tmpl View 1 2 1 chunk +1 line, -1 line 0 comments Download
M mojo/public/tools/bindings/generators/cpp_templates/module.cc.tmpl View 1 2 1 chunk +1 line, -1 line 0 comments Download
M mojo/public/tools/bindings/generators/cpp_templates/struct_declaration.tmpl View 1 2 1 chunk +1 line, -1 line 0 comments Download
M mojo/public/tools/bindings/generators/cpp_templates/struct_definition.tmpl View 1 2 3 chunks +6 lines, -3 lines 0 comments Download
M mojo/public/tools/bindings/generators/cpp_templates/union_declaration.tmpl View 1 2 1 chunk +1 line, -1 line 0 comments Download
M mojo/public/tools/bindings/generators/cpp_templates/union_definition.tmpl View 1 2 2 chunks +6 lines, -4 lines 0 comments Download
M mojo/public/tools/bindings/generators/cpp_templates/validation_macros.tmpl View 1 2 4 chunks +18 lines, -12 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 17 (6 generated)
Ken Rockot(use gerrit already)
Please take a look. Sorry about the size. Most of it is just plumbing Error ...
4 years, 6 months ago (2016-06-13 21:59:22 UTC) #1
yzshen1
https://codereview.chromium.org/2064903002/diff/1/mojo/public/cpp/bindings/error.h File mojo/public/cpp/bindings/error.h (right): https://codereview.chromium.org/2064903002/diff/1/mojo/public/cpp/bindings/error.h#newcode23 mojo/public/cpp/bindings/error.h:23: // read from a pipe. This may be raised ...
4 years, 6 months ago (2016-06-14 16:45:32 UTC) #2
Ken Rockot(use gerrit already)
https://codereview.chromium.org/2064903002/diff/1/mojo/public/cpp/bindings/error.h File mojo/public/cpp/bindings/error.h (right): https://codereview.chromium.org/2064903002/diff/1/mojo/public/cpp/bindings/error.h#newcode23 mojo/public/cpp/bindings/error.h:23: // read from a pipe. This may be raised ...
4 years, 6 months ago (2016-06-14 21:20:40 UTC) #3
yzshen1
Comments before our discussions about using ReportValidationError() to do the work. Please ignore if we ...
4 years, 6 months ago (2016-06-15 16:22:34 UTC) #4
Ken Rockot(use gerrit already)
OK per our offline discussion I've reworked the CL to report bad messages via ReportValidationError. ...
4 years, 6 months ago (2016-06-15 21:32:42 UTC) #6
yzshen1
Great! LGTM with a few nits. https://codereview.chromium.org/2064903002/diff/80001/mojo/public/cpp/bindings/lib/validation_errors.cc File mojo/public/cpp/bindings/lib/validation_errors.cc (right): https://codereview.chromium.org/2064903002/diff/80001/mojo/public/cpp/bindings/lib/validation_errors.cc#newcode75 mojo/public/cpp/bindings/lib/validation_errors.cc:75: if (context->message()) { ...
4 years, 6 months ago (2016-06-15 22:20:10 UTC) #7
Ken Rockot(use gerrit already)
Thanks! https://codereview.chromium.org/2064903002/diff/80001/mojo/public/cpp/bindings/lib/validation_errors.cc File mojo/public/cpp/bindings/lib/validation_errors.cc (right): https://codereview.chromium.org/2064903002/diff/80001/mojo/public/cpp/bindings/lib/validation_errors.cc#newcode75 mojo/public/cpp/bindings/lib/validation_errors.cc:75: if (context->message()) { On 2016/06/15 at 22:20:09, yzshen1 ...
4 years, 6 months ago (2016-06-15 22:38:23 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2064903002/100001
4 years, 6 months ago (2016-06-15 22:38:55 UTC) #11
commit-bot: I haz the power
Committed patchset #5 (id:100001)
4 years, 6 months ago (2016-06-16 02:30:42 UTC) #14
commit-bot: I haz the power
CQ bit was unchecked
4 years, 6 months ago (2016-06-16 02:30:44 UTC) #15
commit-bot: I haz the power
4 years, 6 months ago (2016-06-16 02:32:28 UTC) #17
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/8a88e80c4bea32f83842729d33db85a36ef5b3fa
Cr-Commit-Position: refs/heads/master@{#400075}

Powered by Google App Engine
This is Rietveld 408576698