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

Issue 605443002: The default value for NullableString should be null (was "") (Closed)

Created:
6 years, 2 months ago by hansmuller
Modified:
6 years, 2 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

The default value for NullableString should be null (was ""). Mojo struct fields whose type is string? should be initialized to null, not "". BUG=417039 Committed: https://crrev.com/ae685fa448164fef86b0b97f519ac2f81cc8b310 Cr-Commit-Position: refs/heads/master@{#296612}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Default null applies to string and nullable string #

Patch Set 3 : Added test fields with type double #

Total comments: 10

Patch Set 4 : Added missing types, renamed test functions and struct types #

Unified diffs Side-by-side diffs Delta from patch set Stats (+106 lines, -4 lines) Patch
M mojo/public/interfaces/bindings/tests/test_structs.mojom View 1 2 3 1 chunk +62 lines, -0 lines 0 comments Download
M mojo/public/js/bindings/codec_unittests.js View 1 chunk +1 line, -0 lines 0 comments Download
M mojo/public/js/bindings/struct_unittests.js View 1 2 3 2 chunks +34 lines, -2 lines 0 comments Download
M mojo/public/tools/bindings/generators/mojom_cpp_generator.py View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M mojo/public/tools/bindings/generators/mojom_js_generator.py View 1 1 chunk +2 lines, -2 lines 0 comments Download
M mojo/public/tools/bindings/pylib/mojom/generate/module.py View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 15 (4 generated)
hansmuller
This turned out to be a smaller fix than I'd expected. PTAL when you get ...
6 years, 2 months ago (2014-09-24 19:27:56 UTC) #2
yzshen1
https://codereview.chromium.org/605443002/diff/1/mojo/public/tools/bindings/generators/mojom_js_generator.py File mojo/public/tools/bindings/generators/mojom_js_generator.py (right): https://codereview.chromium.org/605443002/diff/1/mojo/public/tools/bindings/generators/mojom_js_generator.py#newcode34 mojo/public/tools/bindings/generators/mojom_js_generator.py:34: mojom.STRING: '""', I think if a default value is ...
6 years, 2 months ago (2014-09-24 19:41:56 UTC) #3
hansmuller
I added some simple struct tests to verify that all field types are initialized to ...
6 years, 2 months ago (2014-09-24 22:12:07 UTC) #4
yzshen1
LGTM with a few nits Thanks! :) https://codereview.chromium.org/605443002/diff/40001/mojo/public/interfaces/bindings/tests/test_structs.mojom File mojo/public/interfaces/bindings/tests/test_structs.mojom (right): https://codereview.chromium.org/605443002/diff/40001/mojo/public/interfaces/bindings/tests/test_structs.mojom#newcode27 mojo/public/interfaces/bindings/tests/test_structs.mojom:27: int16 f3; ...
6 years, 2 months ago (2014-09-24 22:49:25 UTC) #5
hansmuller
Thanks for the additional feedback and for catching the missing types! https://codereview.chromium.org/605443002/diff/40001/mojo/public/interfaces/bindings/tests/test_structs.mojom File mojo/public/interfaces/bindings/tests/test_structs.mojom (right): ...
6 years, 2 months ago (2014-09-24 23:33:11 UTC) #6
yzshen1
still LGTM Thanks!
6 years, 2 months ago (2014-09-24 23:34:49 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/605443002/60001
6 years, 2 months ago (2014-09-24 23:35:46 UTC) #9
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_gn_dbg on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_gn_dbg/builds/2046)
6 years, 2 months ago (2014-09-24 23:51:58 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/605443002/60001
6 years, 2 months ago (2014-09-25 00:08:27 UTC) #13
commit-bot: I haz the power
Committed patchset #4 (id:60001) as 4c02746c495ea2352509cec0a8ae1f2829672c58
6 years, 2 months ago (2014-09-25 01:35:08 UTC) #14
commit-bot: I haz the power
6 years, 2 months ago (2014-09-25 01:35:47 UTC) #15
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/ae685fa448164fef86b0b97f519ac2f81cc8b310
Cr-Commit-Position: refs/heads/master@{#296612}

Powered by Google App Engine
This is Rietveld 408576698