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

Issue 2796253002: Associated Message Validation (Closed)

Created:
3 years, 8 months ago by wangjimmy
Modified:
3 years, 8 months ago
CC:
Aaron Boodman, abarth-chromium, chromium-reviews, darin (slow to review), qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Add validation conformance tests for associated interfaces. Add encoding, decoding and validation for associated interfaces. Modified Mojo js tmpls to support associated interfaces (encode, decode, default values, validation). Added codec.AssociatedInterfacePtrInfo and codec.AssociatedInterfaceRequest. Modify validator.js validateMessageHeader() to validate v2 messages. Add to validator.js validateAssociatedInterface & validateAssociatedInterfaceRequest. Modify validator.js validateArray(...) to validate array of associated InterfacePtrInfo/InterfaceRequest. BUG=695635 Review-Url: https://codereview.chromium.org/2796253002 Cr-Commit-Position: refs/heads/master@{#464478} Committed: https://chromium.googlesource.com/chromium/src/+/336e07d78b075a81a7debb521f167bd4dfd93ade

Patch Set 1 #

Patch Set 2 : Add nullable #

Patch Set 3 : Export nullable #

Patch Set 4 : Add module prefix in front of NullableAssociatedInterfaceRequest in validator.js. #

Patch Set 5 : Add new associated_bindings file. #

Patch Set 6 : Commit associated_bindings file. #

Patch Set 7 : Remove duplicate export in codec.js #

Patch Set 8 : Fix formatting and add missing check_err() #

Total comments: 2

Patch Set 9 : Remove encode & decode for Associated Interface/Request. Current test only tests validation. #

Total comments: 18

Patch Set 10 : Rename kMessage's. Validate payload interface Ids in validateMessageHeader. Return 0 in claimAssoci… #

Patch Set 11 : Formatting. Add braces to if statements in validateMessageHeader #

Total comments: 10

Patch Set 12 : Change expected console error from vibration_manager.mojom.js from 300 to 301 because of new line f… #

Patch Set 13 : Validate payloadInterfaceIds before getting it. Use [0] for dimensions for validateArrayPointer. Ca… #

Unified diffs Side-by-side diffs Delta from patch set Stats (+287 lines, -39 lines) Patch
M content/content_resources.grd View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/mojo_context_state.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M extensions/renderer/dispatcher.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M ios/web/ios_web_resources.grd View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M ios/web/webui/crw_web_ui_manager.mm View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M mojo/edk/js/tests/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
M mojo/public/js/BUILD.gn View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
A mojo/public/js/associated_bindings.js View 1 2 3 4 5 1 chunk +17 lines, -0 lines 0 comments Download
M mojo/public/js/codec.js View 1 2 3 4 5 6 7 8 9 10 11 12 10 chunks +57 lines, -11 lines 0 comments Download
M mojo/public/js/constants.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M mojo/public/js/constants.cc View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M mojo/public/js/interface_types.js View 3 chunks +19 lines, -0 lines 0 comments Download
M mojo/public/js/tests/validation_unittest.js View 4 chunks +9 lines, -0 lines 0 comments Download
M mojo/public/js/validator.js View 1 2 3 4 5 6 7 8 9 10 11 12 10 chunks +141 lines, -17 lines 0 comments Download
M mojo/public/tools/bindings/generators/js_templates/module.amd.tmpl View 1 2 3 4 2 chunks +2 lines, -1 line 0 comments Download
M mojo/public/tools/bindings/generators/js_templates/validation_macros.tmpl View 1 2 3 4 5 6 7 1 chunk +8 lines, -0 lines 0 comments Download
M mojo/public/tools/bindings/generators/mojom_js_generator.py View 1 2 3 4 5 6 7 8 9 4 chunks +18 lines, -4 lines 0 comments Download
M third_party/WebKit/LayoutTests/mojo/struct.html View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/mojo/union.html View 1 2 3 4 5 6 7 8 9 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/vibration/vibration-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/vibration/vibration-iframe-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 73 (58 generated)
wangjimmy
Hi Eugune, PTAL at ios/. Thank you
3 years, 8 months ago (2017-04-10 18:02:39 UTC) #27
wangjimmy
Hi John, PTAL at content/
3 years, 8 months ago (2017-04-10 18:03:51 UTC) #29
wangjimmy
Hi Ken, PTAL at extensions/ and mojo/.
3 years, 8 months ago (2017-04-10 20:32:00 UTC) #35
Eugene But (OOO till 7-30)
ios lgtm
3 years, 8 months ago (2017-04-10 20:48:37 UTC) #36
Ken Rockot(use gerrit already)
Nice work! LGTM https://codereview.chromium.org/2796253002/diff/140001/mojo/public/js/codec.js File mojo/public/js/codec.js (right): https://codereview.chromium.org/2796253002/diff/140001/mojo/public/js/codec.js#newcode470 mojo/public/js/codec.js:470: kMessageV2HeaderSize-8); nit: Perhaps this should be ...
3 years, 8 months ago (2017-04-10 22:20:17 UTC) #38
wangjimmy
https://codereview.chromium.org/2796253002/diff/140001/mojo/public/js/codec.js File mojo/public/js/codec.js (right): https://codereview.chromium.org/2796253002/diff/140001/mojo/public/js/codec.js#newcode470 mojo/public/js/codec.js:470: kMessageV2HeaderSize-8); On 2017/04/10 22:20:17, Ken Rockot wrote: > nit: ...
3 years, 8 months ago (2017-04-11 00:21:24 UTC) #41
jam
lgtm
3 years, 8 months ago (2017-04-11 01:13:13 UTC) #42
wangjimmy
Hi Yuzhu, PTAL at mojo/. Thank you
3 years, 8 months ago (2017-04-11 01:31:18 UTC) #45
yzshen1
Thanks! It mostly looks good. Just a few nits. https://codereview.chromium.org/2796253002/diff/160001/mojo/public/js/codec.js File mojo/public/js/codec.js (right): https://codereview.chromium.org/2796253002/diff/160001/mojo/public/js/codec.js#newcode35 mojo/public/js/codec.js:35: ...
3 years, 8 months ago (2017-04-11 06:23:11 UTC) #48
wangjimmy
https://codereview.chromium.org/2796253002/diff/160001/mojo/public/js/codec.js File mojo/public/js/codec.js (right): https://codereview.chromium.org/2796253002/diff/160001/mojo/public/js/codec.js#newcode35 mojo/public/js/codec.js:35: var kMessageWithRequestIDHeaderSize = 32; On 2017/04/11 06:23:11, yzshen1 wrote: ...
3 years, 8 months ago (2017-04-12 00:26:17 UTC) #54
yzshen1
https://codereview.chromium.org/2796253002/diff/200001/mojo/public/js/codec.js File mojo/public/js/codec.js (right): https://codereview.chromium.org/2796253002/diff/200001/mojo/public/js/codec.js#newcode41 mojo/public/js/codec.js:41: var kMessagePayloadInterfaceIdsPointerOffset = kMessageV2HeaderSize - 8; Please move this ...
3 years, 8 months ago (2017-04-12 00:50:33 UTC) #55
wangjimmy
https://codereview.chromium.org/2796253002/diff/200001/mojo/public/js/codec.js File mojo/public/js/codec.js (right): https://codereview.chromium.org/2796253002/diff/200001/mojo/public/js/codec.js#newcode41 mojo/public/js/codec.js:41: var kMessagePayloadInterfaceIdsPointerOffset = kMessageV2HeaderSize - 8; On 2017/04/12 00:50:33, ...
3 years, 8 months ago (2017-04-12 18:58:26 UTC) #63
yzshen1
lgtm
3 years, 8 months ago (2017-04-13 18:18:55 UTC) #67
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2796253002/240001
3 years, 8 months ago (2017-04-13 18:36:44 UTC) #70
commit-bot: I haz the power
3 years, 8 months ago (2017-04-13 18:47:32 UTC) #73
Message was sent while issue was closed.
Committed patchset #13 (id:240001) as
https://chromium.googlesource.com/chromium/src/+/336e07d78b075a81a7debb521f16...

Powered by Google App Engine
This is Rietveld 408576698