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

Issue 654843005: Mojo JS Bindings: add support for associative arrays (Mojo map type) (Closed)

Created:
6 years, 2 months ago by hansmuller
Modified:
6 years, 2 months ago
CC:
abarth-chromium, Aaron Boodman, 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
Project:
chromium
Visibility:
Public.

Description

Mojo JS Bindings: add support for associative arrays (Mojo map type) Currently there's only a limited test for the new type. More complete testing to come in a followup patch. BUG=423017 Committed: https://crrev.com/d1fd54c8da40c9e7c1e7821259c39af947529f77 Cr-Commit-Position: refs/heads/master@{#299992}

Patch Set 1 #

Total comments: 14

Patch Set 2 : Added validation for map fields/params, limited tests #

Patch Set 3 : Fixed a typo #

Total comments: 4

Patch Set 4 : Corrected validation for array map values #

Total comments: 4

Patch Set 5 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+260 lines, -11 lines) Patch
M gin/test/expect.js View 2 chunks +11 lines, -1 line 0 comments Download
M mojo/public/html/convert_amd_modules_to_html.py View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M mojo/public/interfaces/bindings/tests/test_structs.mojom View 1 2 3 1 chunk +30 lines, -0 lines 0 comments Download
M mojo/public/js/bindings/codec.js View 1 2 3 5 chunks +54 lines, -1 line 0 comments Download
M mojo/public/js/bindings/struct_unittests.js View 1 2 3 4 2 chunks +71 lines, -3 lines 0 comments Download
M mojo/public/js/bindings/validator.js View 1 2 3 4 4 chunks +61 lines, -4 lines 0 comments Download
M mojo/public/tools/bindings/generators/js_templates/struct_definition.tmpl View 1 1 chunk +4 lines, -0 lines 0 comments Download
M mojo/public/tools/bindings/generators/mojom_js_generator.py View 1 2 3 7 chunks +28 lines, -1 line 0 comments Download

Messages

Total messages: 16 (3 generated)
hansmuller
Adam I'd appreciate if you'd look at the extension I made to expect.js Yuzhu - ...
6 years, 2 months ago (2014-10-14 20:30:40 UTC) #2
abarth-chromium
LGTM https://codereview.chromium.org/654843005/diff/1/mojo/public/js/bindings/codec.js File mojo/public/js/bindings/codec.js (right): https://codereview.chromium.org/654843005/diff/1/mojo/public/js/bindings/codec.js#newcode380 mojo/public/js/bindings/codec.js:380: }); for (var [key, value] of val) { ...
6 years, 2 months ago (2014-10-15 04:53:26 UTC) #3
yzshen1
I didn't the code for map validation. The key/value arrays are of the same size; ...
6 years, 2 months ago (2014-10-15 05:58:02 UTC) #4
yzshen1
I didn't the code for map validation. The key/value arrays are of the same size; ...
6 years, 2 months ago (2014-10-15 05:58:03 UTC) #5
qsr
https://chromiumcodereview.appspot.com/654843005/diff/1/mojo/public/interfaces/bindings/tests/test_structs.mojom File mojo/public/interfaces/bindings/tests/test_structs.mojom (right): https://chromiumcodereview.appspot.com/654843005/diff/1/mojo/public/interfaces/bindings/tests/test_structs.mojom#newcode124 mojo/public/interfaces/bindings/tests/test_structs.mojom:124: map<string, string> f9; Do you want to test with ...
6 years, 2 months ago (2014-10-15 13:03:40 UTC) #7
hansmuller
I'd originally planned to wait until the new conformance tests were ready, before adding validation ...
6 years, 2 months ago (2014-10-15 21:45:46 UTC) #8
yzshen1
https://codereview.chromium.org/654843005/diff/1/mojo/public/interfaces/bindings/tests/test_structs.mojom File mojo/public/interfaces/bindings/tests/test_structs.mojom (right): https://codereview.chromium.org/654843005/diff/1/mojo/public/interfaces/bindings/tests/test_structs.mojom#newcode124 mojo/public/interfaces/bindings/tests/test_structs.mojom:124: map<string, string> f9; On 2014/10/15 21:45:46, hansmuller wrote: > ...
6 years, 2 months ago (2014-10-15 22:22:13 UTC) #9
hansmuller
I've corrected the validation support for map array values and added some test cases to ...
6 years, 2 months ago (2014-10-16 20:11:04 UTC) #10
yzshen1
LGTM Thanks! https://codereview.chromium.org/654843005/diff/60001/mojo/public/js/bindings/struct_unittests.js File mojo/public/js/bindings/struct_unittests.js (right): https://codereview.chromium.org/654843005/diff/60001/mojo/public/js/bindings/struct_unittests.js#newcode149 mojo/public/js/bindings/struct_unittests.js:149: f3: new Map([["a", ["1", "2"]], ["b", ["1", ...
6 years, 2 months ago (2014-10-16 20:22:47 UTC) #11
hansmuller
Thanks for the digging through this change so carefully. https://codereview.chromium.org/654843005/diff/60001/mojo/public/js/bindings/struct_unittests.js File mojo/public/js/bindings/struct_unittests.js (right): https://codereview.chromium.org/654843005/diff/60001/mojo/public/js/bindings/struct_unittests.js#newcode149 mojo/public/js/bindings/struct_unittests.js:149: ...
6 years, 2 months ago (2014-10-16 20:43:41 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/654843005/80001
6 years, 2 months ago (2014-10-16 20:46:24 UTC) #14
commit-bot: I haz the power
Committed patchset #5 (id:80001)
6 years, 2 months ago (2014-10-16 22:21:35 UTC) #15
commit-bot: I haz the power
6 years, 2 months ago (2014-10-16 22:22:14 UTC) #16
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/d1fd54c8da40c9e7c1e7821259c39af947529f77
Cr-Commit-Position: refs/heads/master@{#299992}

Powered by Google App Engine
This is Rietveld 408576698