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

Issue 1646963002: [mojo] Fix unions in Java generated bindings (Closed)

Created:
4 years, 10 months ago by Luis Héctor Chávez
Modified:
4 years, 10 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/a/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[mojo] Fix unions in Java generated bindings {{field.ordinal}} is not defined anymore, which was causing 'None's to get printed in the generated code. This change makes the tag generation consistnt with the C++ binding: it assigns ordinals in the order in which they appear in the file. BUG=582186 TEST=pipe_control_messages.mojom builds under Java Committed: https://crrev.com/0c2d2a05cd042a282478ee4a491ebf91a72f82a2 Cr-Commit-Position: refs/heads/master@{#372185}

Patch Set 1 #

Total comments: 2

Patch Set 2 : s/loop.index - 1/loop.index0/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+8 lines, -8 lines) Patch
M mojo/public/tools/bindings/generators/java_templates/data_types_definition.tmpl View 1 8 chunks +8 lines, -8 lines 0 comments Download

Messages

Total messages: 10 (4 generated)
Luis Héctor Chávez
PTAL
4 years, 10 months ago (2016-01-28 20:42:42 UTC) #2
yzshen1
LGTM Thanks a lot! https://codereview.chromium.org/1646963002/diff/1/mojo/public/tools/bindings/generators/java_templates/data_types_definition.tmpl File mojo/public/tools/bindings/generators/java_templates/data_types_definition.tmpl (right): https://codereview.chromium.org/1646963002/diff/1/mojo/public/tools/bindings/generators/java_templates/data_types_definition.tmpl#newcode246 mojo/public/tools/bindings/generators/java_templates/data_types_definition.tmpl:246: public static final int {{field|ucc}} ...
4 years, 10 months ago (2016-01-28 21:19:43 UTC) #3
Luis Héctor Chávez
https://codereview.chromium.org/1646963002/diff/1/mojo/public/tools/bindings/generators/java_templates/data_types_definition.tmpl File mojo/public/tools/bindings/generators/java_templates/data_types_definition.tmpl (right): https://codereview.chromium.org/1646963002/diff/1/mojo/public/tools/bindings/generators/java_templates/data_types_definition.tmpl#newcode246 mojo/public/tools/bindings/generators/java_templates/data_types_definition.tmpl:246: public static final int {{field|ucc}} = {{loop.index - 1}}; ...
4 years, 10 months ago (2016-01-28 21:24:06 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1646963002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1646963002/20001
4 years, 10 months ago (2016-01-28 21:25:39 UTC) #7
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 10 months ago (2016-01-28 22:35:52 UTC) #8
commit-bot: I haz the power
4 years, 10 months ago (2016-01-28 22:36:51 UTC) #10
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/0c2d2a05cd042a282478ee4a491ebf91a72f82a2
Cr-Commit-Position: refs/heads/master@{#372185}

Powered by Google App Engine
This is Rietveld 408576698