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

Issue 2741943002: mojo bindings: Support enums with no values (Closed)

Created:
3 years, 9 months ago by watk
Modified:
3 years, 9 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)
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

mojo bindings: Support enums with no values Previously it was invalid to define an empty enum, i.e.: enum A {}; Now empty enums are a valid declaration. In practice it's not useful to have an empty, non-extensible enum because all values will fail message validation. However, an extensible empty enum may be useful because all values are valid for it. BUG=619693 TEST=existing tests & new bindings conformance test Review-Url: https://codereview.chromium.org/2741943002 Cr-Commit-Position: refs/heads/master@{#456596} Committed: https://chromium.googlesource.com/chromium/src/+/497ec8da95fdb294957278ebd8dc49d5f88b980f

Patch Set 1 #

Total comments: 2

Patch Set 2 : new test & template change #

Messages

Total messages: 21 (13 generated)
watk
Hi yzshen@, PTAL. Let me know if I can add more tests. I figured that ...
3 years, 9 months ago (2017-03-10 07:21:06 UTC) #4
yzshen1
LGTM with one nit. Thanks! https://codereview.chromium.org/2741943002/diff/1/mojo/public/interfaces/bindings/tests/data/validation/conformance_mthd21_empty_enum_accepts_any_value.data File mojo/public/interfaces/bindings/tests/data/validation/conformance_mthd21_empty_enum_accepts_any_value.data (right): https://codereview.chromium.org/2741943002/diff/1/mojo/public/interfaces/bindings/tests/data/validation/conformance_mthd21_empty_enum_accepts_any_value.data#newcode1 mojo/public/interfaces/bindings/tests/data/validation/conformance_mthd21_empty_enum_accepts_any_value.data:1: [dist4]message_header // num_bytes nit: ...
3 years, 9 months ago (2017-03-10 16:43:48 UTC) #9
watk
Thanks! New test added and I had to special case the operator<<() implementation for empty ...
3 years, 9 months ago (2017-03-13 00:39:32 UTC) #11
yzshen1
LGTM++
3 years, 9 months ago (2017-03-13 17:44:42 UTC) #12
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/2741943002/40001
3 years, 9 months ago (2017-03-14 00:11:23 UTC) #14
commit-bot: I haz the power
Try jobs failed on following builders: android_n5x_swarming_rel on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_n5x_swarming_rel/builds/135942)
3 years, 9 months ago (2017-03-14 00:25:32 UTC) #16
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/2741943002/40001
3 years, 9 months ago (2017-03-14 00:40:52 UTC) #18
commit-bot: I haz the power
3 years, 9 months ago (2017-03-14 02:55:02 UTC) #21
Message was sent while issue was closed.
Committed patchset #2 (id:40001) as
https://chromium.googlesource.com/chromium/src/+/497ec8da95fdb294957278ebd8dc...

Powered by Google App Engine
This is Rietveld 408576698