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

Issue 851673003: Cleanup: Some simplifications in json_schema_compiler. (Closed)

Created:
5 years, 11 months ago by pneubeck (no reviews)
Modified:
5 years, 11 months ago
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@fix_dart_tests
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Cleanup: Some simplifications in json_schema_compiler. There were several GetItemFromList functions that extract an element from a ListValue and converted it. This change consolidates the list access into a single place and simplifies the GetItemFromList to the conversion only (renamed to PopulateItem). No functional change. Committed: https://crrev.com/de496d5995a59c568f594f49fb2f76cefb4df54c Cr-Commit-Position: refs/heads/master@{#312082}

Patch Set 1 : #

Total comments: 8

Patch Set 2 : PopulateItem function argument #

Patch Set 3 : Add unit test for GetAsBinary. #

Total comments: 1

Patch Set 4 : Drop ArrayBuffer change, keep other simplifications. #

Total comments: 2

Patch Set 5 : Range-based for loops, fix formatting #

Patch Set 6 : Rebased. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+58 lines, -85 lines) Patch
M tools/json_schema_compiler/cc_generator.py View 1 2 3 4 5 1 chunk +4 lines, -4 lines 0 comments Download
M tools/json_schema_compiler/util.h View 1 2 3 4 5 5 chunks +33 lines, -51 lines 0 comments Download
M tools/json_schema_compiler/util.cc View 1 2 3 4 3 chunks +15 lines, -21 lines 0 comments Download
M tools/json_schema_compiler/util_cc_helper.py View 1 2 3 1 chunk +6 lines, -9 lines 0 comments Download

Messages

Total messages: 42 (18 generated)
pneubeck (no reviews)
if you're ok with this solution then I can add more documentation of the binary_tag. ...
5 years, 11 months ago (2015-01-13 15:10:47 UTC) #3
not at google - send to devlin
Probably TMI here. Sorry about the nits. https://codereview.chromium.org/851673003/diff/20001/tools/json_schema_compiler/util.h File tools/json_schema_compiler/util.h (right): https://codereview.chromium.org/851673003/diff/20001/tools/json_schema_compiler/util.h#newcode20 tools/json_schema_compiler/util.h:20: struct ITEMS_ARE_NOT_BINARY ...
5 years, 11 months ago (2015-01-13 18:15:14 UTC) #5
Jeffrey Yasskin
https://codereview.chromium.org/851673003/diff/20001/tools/json_schema_compiler/util.h File tools/json_schema_compiler/util.h (right): https://codereview.chromium.org/851673003/diff/20001/tools/json_schema_compiler/util.h#newcode20 tools/json_schema_compiler/util.h:20: struct ITEMS_ARE_NOT_BINARY {}; On 2015/01/13 18:15:13, kalman wrote: > ...
5 years, 11 months ago (2015-01-13 18:57:09 UTC) #6
not at google - send to devlin
https://codereview.chromium.org/851673003/diff/20001/tools/json_schema_compiler/util.h File tools/json_schema_compiler/util.h (right): https://codereview.chromium.org/851673003/diff/20001/tools/json_schema_compiler/util.h#newcode20 tools/json_schema_compiler/util.h:20: struct ITEMS_ARE_NOT_BINARY {}; > Function pointers are generally slow ...
5 years, 11 months ago (2015-01-13 19:39:56 UTC) #7
Jeffrey Yasskin
https://codereview.chromium.org/851673003/diff/20001/tools/json_schema_compiler/util.h File tools/json_schema_compiler/util.h (right): https://codereview.chromium.org/851673003/diff/20001/tools/json_schema_compiler/util.h#newcode20 tools/json_schema_compiler/util.h:20: struct ITEMS_ARE_NOT_BINARY {}; On 2015/01/13 19:39:56, kalman wrote: > ...
5 years, 11 months ago (2015-01-13 21:17:21 UTC) #8
pneubeck (no reviews)
Changed to approximately what Benjamin suggested however making use of C++ overloading to automatically select ...
5 years, 11 months ago (2015-01-14 10:54:15 UTC) #10
pneubeck (no reviews)
mark@chromium.org: Please review changes in base/values*
5 years, 11 months ago (2015-01-14 10:55:23 UTC) #12
Mark Mentovai
LGTM https://codereview.chromium.org/851673003/diff/80001/base/values.h File base/values.h (right): https://codereview.chromium.org/851673003/diff/80001/base/values.h#newcode82 base/values.h:82: virtual bool GetAsBinary(std::string* out_value) const; Can you keep ...
5 years, 11 months ago (2015-01-14 14:39:59 UTC) #13
not at google - send to devlin
Philip - sorry to run you around here, but I do think that Jeffrey's suggestion ...
5 years, 11 months ago (2015-01-14 21:22:47 UTC) #14
pneubeck (no reviews)
-Mark your discussion with Jeffrey didn't come to a conclusion and, independent of our issues ...
5 years, 11 months ago (2015-01-15 10:01:40 UTC) #17
not at google - send to devlin
On 2015/01/15 10:01:40, pneubeck wrote: > -Mark > > your discussion with Jeffrey didn't come ...
5 years, 11 months ago (2015-01-15 20:44:11 UTC) #18
not at google - send to devlin
lgtm https://codereview.chromium.org/851673003/diff/120001/tools/json_schema_compiler/util.h File tools/json_schema_compiler/util.h (right): https://codereview.chromium.org/851673003/diff/120001/tools/json_schema_compiler/util.h#newcode49 tools/json_schema_compiler/util.h:49: for (size_t i = 0; i < list.GetSize(); ...
5 years, 11 months ago (2015-01-15 20:47:30 UTC) #19
pneubeck (no reviews)
https://codereview.chromium.org/851673003/diff/120001/tools/json_schema_compiler/util.h File tools/json_schema_compiler/util.h (right): https://codereview.chromium.org/851673003/diff/120001/tools/json_schema_compiler/util.h#newcode49 tools/json_schema_compiler/util.h:49: for (size_t i = 0; i < list.GetSize(); ++i) ...
5 years, 11 months ago (2015-01-16 08:20:14 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/851673003/140001
5 years, 11 months ago (2015-01-16 08:21:12 UTC) #24
commit-bot: I haz the power
Try jobs failed on following builders: ios_rel_device_ng on tryserver.chromium.mac (http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_rel_device_ng/builds/1737) Try jobs failed on following ...
5 years, 11 months ago (2015-01-16 08:23:54 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/851673003/140001
5 years, 11 months ago (2015-01-16 16:25:49 UTC) #28
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_compile_dbg_32_ng on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_compile_dbg_32_ng/builds/14717) ios_dbg_simulator on tryserver.chromium.mac (http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator/builds/49753) ios_rel_device_ng ...
5 years, 11 months ago (2015-01-16 16:26:23 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/851673003/160001
5 years, 11 months ago (2015-01-16 16:32:43 UTC) #32
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/24185)
5 years, 11 months ago (2015-01-16 17:57:37 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/851673003/160001
5 years, 11 months ago (2015-01-16 21:08:16 UTC) #36
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/24185)
5 years, 11 months ago (2015-01-16 21:09:01 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/851673003/160001
5 years, 11 months ago (2015-01-19 08:49:19 UTC) #40
commit-bot: I haz the power
Committed patchset #6 (id:160001)
5 years, 11 months ago (2015-01-19 08:50:21 UTC) #41
commit-bot: I haz the power
5 years, 11 months ago (2015-01-19 08:51:13 UTC) #42
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/de496d5995a59c568f594f49fb2f76cefb4df54c
Cr-Commit-Position: refs/heads/master@{#312082}

Powered by Google App Engine
This is Rietveld 408576698