New issue
Advanced search Search tips

Issue 813604 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner: ----
Closed: Aug 22
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Feature
Launch-Privacy: NotReviewed
Launch-Security: NotReviewed
Launch-UI: NotReviewed



Sign in to add a comment

JSON schema compiler has an issue caused by typo for string properties

Reported by claudiom...@gmail.com, Feb 19 2018

Issue description

Properties declared on .IDL files generate a static data on the local file. Unfortunately, the only type having issues is std::string due to what can only be assumed as a typo in the following line:

https://cs.chromium.org/chromium/src/tools/json_schema_compiler/cpp_type_generator.py?l=256&rcl=04972bf5036f2d419e7f825f13b5325468faa635


 
I'm submitting a CL for review.
Project Member

Comment 3 by bugdroid1@chromium.org, Feb 22 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ca30a03eee533bc7c31dd160ec3a8b94ac896a51

commit ca30a03eee533bc7c31dd160ec3a8b94ac896a51
Author: Claudio DeSouza <claudiomdsjr@gmail.com>
Date: Thu Feb 22 14:12:38 2018

JSON schema compiler fix for std::string

When adding support for static properties on the compiler, the wrong
field was assigned for the value of properties using std::string This
led to all string properties having the value "std::string".

We are not only fixing that, but also amending it to use const char[]
globals, rather than std::string.

Bug:  813604 
Change-Id: Ie386cb925ce3e55436e606fb5e512d7c1798788f
Reviewed-on: https://chromium-review.googlesource.com/925363
Commit-Queue: Elly Fong-Jones <ellyjones@chromium.org>
Reviewed-by: Devlin <rdevlin.cronin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#538425}
[modify] https://crrev.com/ca30a03eee533bc7c31dd160ec3a8b94ac896a51/tools/json_schema_compiler/cpp_type_generator.py
[modify] https://crrev.com/ca30a03eee533bc7c31dd160ec3a8b94ac896a51/tools/json_schema_compiler/idl_schema_test.py
[modify] https://crrev.com/ca30a03eee533bc7c31dd160ec3a8b94ac896a51/tools/json_schema_compiler/model.py
[modify] https://crrev.com/ca30a03eee533bc7c31dd160ec3a8b94ac896a51/tools/json_schema_compiler/test/BUILD.gn
[modify] https://crrev.com/ca30a03eee533bc7c31dd160ec3a8b94ac896a51/tools/json_schema_compiler/test/idl_properties.idl
[modify] https://crrev.com/ca30a03eee533bc7c31dd160ec3a8b94ac896a51/tools/json_schema_compiler/test/idl_schemas_unittest.cc

Cc: ellyjo...@chromium.org
@claudiomdsjr/@ellyjones can we close this one?
Yes. This ticket can be closed now!
Labels: -Launch-API-NotReviewed
Status: Fixed (was: Unconfirmed)
Closing per #5.

Sign in to add a comment