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

Issue 488173006: Integrate Mojo JS validation bindings with the Router (Closed)

Created:
6 years, 4 months ago by hansmuller
Modified:
6 years, 3 months ago
Reviewers:
yzshen1
CC:
chromium-reviews, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, darin (slow to review), ben+mojo_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Integrate Mojo JS validation bindings with the Router Instad of generating exported validateFooRequest(), validateFooResponse() methods, a pointer to a validation functions is added to the generated Stub and Proxy class prototypes. For example, given an interface Foo, with client interface FooClient: FooStub.prototype.validators = [validateFooRequest]; FooProxy.prototype.validators = [validateFooResponse]; Note that if interface Foo has no callbacks, then FooProxy.prototype.validators is an empty array. The router validates incoming messages using these functions and validateMessageHeader(). BUG=407181 Committed: https://crrev.com/08768f75fe85867797a826fc53f555d592cfda5c Cr-Commit-Position: refs/heads/master@{#292270}

Patch Set 1 : router integration #

Patch Set 2 : Revised mapping from Connection local,remote factories to validators #

Patch Set 3 : Fixed a template indentO #

Total comments: 4

Patch Set 4 : One more indentation fix (sorry about the noise) #

Total comments: 2

Patch Set 5 : Final changes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+35 lines, -14 lines) Patch
M mojo/public/js/bindings/connection.js View 1 2 3 4 1 chunk +9 lines, -0 lines 0 comments Download
M mojo/public/js/bindings/router.js View 1 2 3 4 2 chunks +11 lines, -2 lines 0 comments Download
M mojo/public/js/bindings/validation_unittests.js View 1 2 3 4 1 chunk +4 lines, -6 lines 0 comments Download
M mojo/public/tools/bindings/generators/js_templates/interface_definition.tmpl View 1 2 3 4 2 chunks +8 lines, -1 line 0 comments Download
M mojo/public/tools/bindings/generators/js_templates/module.js.tmpl View 2 chunks +3 lines, -5 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
hansmuller
hansmuller@chromium.org changed reviewers: + yzshen@chromium.org
6 years, 4 months ago (2014-08-26 01:32:25 UTC) #1
hansmuller
Patchset #1 (id:1) has been deleted
6 years, 3 months ago (2014-08-26 21:17:36 UTC) #2
hansmuller
This change connects the router to the validation code.
6 years, 3 months ago (2014-08-26 21:22:48 UTC) #3
hansmuller
I've removed the validators that were being generated for client interfaces per our discussion.
6 years, 3 months ago (2014-08-27 18:10:18 UTC) #4
yzshen1
LGTM with nits. Thanks! https://codereview.chromium.org/488173006/diff/60001/mojo/public/js/bindings/router.js File mojo/public/js/bindings/router.js (right): https://codereview.chromium.org/488173006/diff/60001/mojo/public/js/bindings/router.js#newcode60 mojo/public/js/bindings/router.js:60: Router.prototype.setValidators = function(validators) { It ...
6 years, 3 months ago (2014-08-27 18:21:39 UTC) #5
hansmuller
Thanks for the feedback, I've made the suggested changes. https://codereview.chromium.org/488173006/diff/60001/mojo/public/js/bindings/router.js File mojo/public/js/bindings/router.js (right): https://codereview.chromium.org/488173006/diff/60001/mojo/public/js/bindings/router.js#newcode60 mojo/public/js/bindings/router.js:60: ...
6 years, 3 months ago (2014-08-27 21:07:03 UTC) #6
hansmuller
The CQ bit was checked by hansmuller@chromium.org
6 years, 3 months ago (2014-08-27 21:08:08 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hansmuller@chromium.org/488173006/100001
6 years, 3 months ago (2014-08-27 21:09:39 UTC) #8
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: linux_chromium_chromeos_rel_swarming on tryserver.chromium.linux ...
6 years, 3 months ago (2014-08-27 23:09:06 UTC) #9
commit-bot: I haz the power
Committed patchset #5 (id:100001) as eb24425f70b5b0d26ee4e72cf22778d75fbb0c2a
6 years, 3 months ago (2014-08-27 23:45:34 UTC) #10
commit-bot: I haz the power
6 years, 3 months ago (2014-09-10 02:55:43 UTC) #11
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/08768f75fe85867797a826fc53f555d592cfda5c
Cr-Commit-Position: refs/heads/master@{#292270}

Powered by Google App Engine
This is Rietveld 408576698