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

Issue 522653004: mojo: Validate fixed size array for the mojo java bindings. (Closed)

Created:
6 years, 3 months ago by qsr
Modified:
6 years, 3 months ago
Reviewers:
jamesr, yzshen1, ppi
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

mojo: Validate fixed size array for the mojo java bindings. R=ppi@chromium.org Committed: https://crrev.com/1e342dff6f2d0c330423a29a26576665daf33b57 Cr-Commit-Position: refs/heads/master@{#292862}

Patch Set 1 #

Total comments: 13

Patch Set 2 : Follow review #

Total comments: 2

Patch Set 3 : Rebase #

Patch Set 4 : Fix gn build. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+148 lines, -57 lines) Patch
M mojo/public/java/BUILD.gn View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M mojo/public/java/bindings/src/org/chromium/mojo/bindings/BindingsHelper.java View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M mojo/public/java/bindings/src/org/chromium/mojo/bindings/Decoder.java View 1 2 17 chunks +53 lines, -33 lines 0 comments Download
M mojo/public/java/bindings/src/org/chromium/mojo/bindings/Encoder.java View 1 2 6 chunks +40 lines, -22 lines 0 comments Download
A mojo/public/java/bindings/src/org/chromium/mojo/bindings/SerializationException.java View 1 1 chunk +26 lines, -0 lines 0 comments Download
M mojo/public/tools/bindings/generators/java_templates/struct_definition.tmpl View 1 2 2 chunks +10 lines, -2 lines 0 comments Download
M mojo/public/tools/bindings/generators/mojom_java_generator.py View 1 2 3 chunks +13 lines, -0 lines 0 comments Download

Messages

Total messages: 20 (3 generated)
qsr
6 years, 3 months ago (2014-08-29 15:02:56 UTC) #1
ppi
lgtm % nits below https://chromiumcodereview.appspot.com/522653004/diff/1/mojo/public/java/bindings/src/org/chromium/mojo/bindings/BindingsHelper.java File mojo/public/java/bindings/src/org/chromium/mojo/bindings/BindingsHelper.java (right): https://chromiumcodereview.appspot.com/522653004/diff/1/mojo/public/java/bindings/src/org/chromium/mojo/bindings/BindingsHelper.java#newcode34 mojo/public/java/bindings/src/org/chromium/mojo/bindings/BindingsHelper.java:34: public static final int UNDEFINED_ARRAY_LENTH ...
6 years, 3 months ago (2014-08-29 15:23:45 UTC) #2
qsr
https://chromiumcodereview.appspot.com/522653004/diff/1/mojo/public/java/bindings/src/org/chromium/mojo/bindings/BindingsHelper.java File mojo/public/java/bindings/src/org/chromium/mojo/bindings/BindingsHelper.java (right): https://chromiumcodereview.appspot.com/522653004/diff/1/mojo/public/java/bindings/src/org/chromium/mojo/bindings/BindingsHelper.java#newcode34 mojo/public/java/bindings/src/org/chromium/mojo/bindings/BindingsHelper.java:34: public static final int UNDEFINED_ARRAY_LENTH = -1; On 2014/08/29 ...
6 years, 3 months ago (2014-08-29 16:24:12 UTC) #3
ppi
Thanks, still lgtm. https://chromiumcodereview.appspot.com/522653004/diff/1/mojo/public/java/bindings/src/org/chromium/mojo/bindings/Decoder.java File mojo/public/java/bindings/src/org/chromium/mojo/bindings/Decoder.java (right): https://chromiumcodereview.appspot.com/522653004/diff/1/mojo/public/java/bindings/src/org/chromium/mojo/bindings/Decoder.java#newcode139 mojo/public/java/bindings/src/org/chromium/mojo/bindings/Decoder.java:139: throw new DeserializationException("Incorrect array length. Expecting: ...
6 years, 3 months ago (2014-08-29 16:27:28 UTC) #4
yzshen1
yzshen@chromium.org changed reviewers: + yzshen@chromium.org
6 years, 3 months ago (2014-08-29 16:32:24 UTC) #5
yzshen1
https://chromiumcodereview.appspot.com/522653004/diff/20001/mojo/public/tools/bindings/generators/mojom_java_generator.py File mojo/public/tools/bindings/generators/mojom_java_generator.py (right): https://chromiumcodereview.appspot.com/522653004/diff/20001/mojo/public/tools/bindings/generators/mojom_java_generator.py#newcode177 mojo/public/tools/bindings/generators/mojom_java_generator.py:177: "org.chromium.mojo.bindings.BindingsHelper.UNSPECIFIED_ARRAY_LENGTH"); One nit: Other bindings use 0 as "unspecified ...
6 years, 3 months ago (2014-08-29 16:32:24 UTC) #6
qsr
On Aug 29, 2014 6:32 PM, <yzshen@chromium.org> wrote: > > > https://chromiumcodereview.appspot.com/522653004/diff/20001/mojo/public/tools/bindings/generators/mojom_java_generator.py > File mojo/public/tools/bindings/generators/mojom_java_generator.py ...
6 years, 3 months ago (2014-08-29 21:18:15 UTC) #7
yzshen1
I don't have a strong reason. :) (+CC jamesr) I think that is because we ...
6 years, 3 months ago (2014-08-29 21:26:32 UTC) #8
jamesr
Is the question about how what a mojom declaration like int[0] foo; should do? I ...
6 years, 3 months ago (2014-08-29 21:34:08 UTC) #10
yzshen1
I think the question from Ben is why picking 0 as "any element number is ...
6 years, 3 months ago (2014-08-29 22:08:03 UTC) #11
chromium-reviews
Well, it's an unsigned isn't it? -1 is not a valid value. MAX_VALUE is possibly ...
6 years, 3 months ago (2014-08-29 22:37:44 UTC) #12
qsr
> Is the question about how what a mojom declaration like > > int[0] foo; ...
6 years, 3 months ago (2014-08-30 09:22:43 UTC) #13
qsr
https://codereview.chromium.org/522653004/diff/20001/mojo/public/tools/bindings/generators/mojom_java_generator.py File mojo/public/tools/bindings/generators/mojom_java_generator.py (right): https://codereview.chromium.org/522653004/diff/20001/mojo/public/tools/bindings/generators/mojom_java_generator.py#newcode177 mojo/public/tools/bindings/generators/mojom_java_generator.py:177: "org.chromium.mojo.bindings.BindingsHelper.UNSPECIFIED_ARRAY_LENGTH"); On 2014/08/29 16:32:24, yzshen1 wrote: > One nit: ...
6 years, 3 months ago (2014-09-01 09:07:01 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/qsr@chromium.org/522653004/40001
6 years, 3 months ago (2014-09-01 09:08:00 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/qsr@chromium.org/522653004/60001
6 years, 3 months ago (2014-09-01 10:49:20 UTC) #18
commit-bot: I haz the power
Committed patchset #4 (id:60001) as 9fd89706b1ab272b734bf4ec13762d6d56f2d213
6 years, 3 months ago (2014-09-01 11:44:23 UTC) #19
commit-bot: I haz the power
6 years, 3 months ago (2014-09-10 03:16:32 UTC) #20
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/1e342dff6f2d0c330423a29a26576665daf33b57
Cr-Commit-Position: refs/heads/master@{#292862}

Powered by Google App Engine
This is Rietveld 408576698