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

Issue 197873009: Support scoped types in PPAPI IDL. (Closed)

Created:
6 years, 9 months ago by mtomasz
Modified:
6 years, 8 months ago
CC:
chromium-reviews
Visibility:
Public.

Description

Support scoped types in PPAPI IDL. IDL parser didn't support namespaces, which however are supported by JSON. This patch adds grammar to allow adding a namespace as a prefix to any type. TEST=json_schema_test.py + tested manually that it works. BUG=158654 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=261911

Patch Set 1 #

Total comments: 6

Patch Set 2 : Addressed comments. #

Patch Set 3 : Addressed comments. #

Patch Set 4 : Rebased. #

Total comments: 2

Patch Set 5 : Fixed compiling. #

Total comments: 3

Patch Set 6 : Fixed. #

Patch Set 7 : Fixed schema loader for Chromiums API idls. #

Total comments: 7

Patch Set 8 : Addressed comments. #

Patch Set 9 : Cleaned up. #

Total comments: 14

Patch Set 10 : Simplified. #

Patch Set 11 : Simplified. #

Patch Set 12 : More fixes. #

Total comments: 2

Patch Set 13 : Cleaned up. #

Patch Set 14 : Fixed tests. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+145 lines, -57 lines) Patch
M ppapi/generators/idl_parser.py View 1 2 3 4 5 5 chunks +32 lines, -6 lines 0 comments Download
M tools/json_schema_compiler/cc_generator.py View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +14 lines, -6 lines 0 comments Download
M tools/json_schema_compiler/cpp_type_generator.py View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +9 lines, -9 lines 0 comments Download
M tools/json_schema_compiler/idl_schema_test.py View 1 2 3 4 3 chunks +51 lines, -24 lines 0 comments Download
M tools/json_schema_compiler/schema_loader.py View 1 2 3 4 5 6 7 2 chunks +8 lines, -2 lines 0 comments Download
M tools/json_schema_compiler/test/error_generation_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -1 line 0 comments Download
M tools/json_schema_compiler/test/idl_basics.idl View 1 2 3 4 1 chunk +14 lines, -5 lines 0 comments Download
A + tools/json_schema_compiler/test/idl_other_namespace.idl View 1 2 3 4 1 chunk +7 lines, -2 lines 0 comments Download
A + tools/json_schema_compiler/test/idl_other_namespace_sub_namespace.idl View 1 2 3 4 1 chunk +7 lines, -2 lines 0 comments Download
M tools/json_schema_compiler/test/json_schema_compiler_tests.gyp View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 52 (0 generated)
mtomasz
@kalman, @nbarth: PTAL. Thanks.
6 years, 9 months ago (2014-03-13 06:52:37 UTC) #1
mtomasz
@noelallen: PTAL, since @kalman is OOO.
6 years, 9 months ago (2014-03-13 06:55:12 UTC) #2
Nils Barth (inactive)
idl_parser changes LGTM w/ nits. https://codereview.chromium.org/197873009/diff/1/ppapi/generators/idl_parser.py File ppapi/generators/idl_parser.py (right): https://codereview.chromium.org/197873009/diff/1/ppapi/generators/idl_parser.py#newcode277 ppapi/generators/idl_parser.py:277: p[0] = "".join(p[1:]) Style: ...
6 years, 9 months ago (2014-03-13 07:24:54 UTC) #3
noelallen_use_chromium
otherwise LGTM https://codereview.chromium.org/197873009/diff/1/ppapi/generators/idl_parser.py File ppapi/generators/idl_parser.py (right): https://codereview.chromium.org/197873009/diff/1/ppapi/generators/idl_parser.py#newcode275 ppapi/generators/idl_parser.py:275: """typeref : SYMBOL This does not appear ...
6 years, 9 months ago (2014-03-13 16:31:05 UTC) #4
mtomasz
https://codereview.chromium.org/197873009/diff/1/ppapi/generators/idl_parser.py File ppapi/generators/idl_parser.py (right): https://codereview.chromium.org/197873009/diff/1/ppapi/generators/idl_parser.py#newcode275 ppapi/generators/idl_parser.py:275: """typeref : SYMBOL On 2014/03/13 16:31:05, noelallen wrote: > ...
6 years, 9 months ago (2014-03-14 00:36:43 UTC) #5
Nils Barth (inactive)
How about merging the two rules, suitably renamed? (As discussed offline.) https://codereview.chromium.org/197873009/diff/1/ppapi/generators/idl_parser.py File ppapi/generators/idl_parser.py (right): ...
6 years, 9 months ago (2014-03-14 00:41:44 UTC) #6
noelallen_use_chromium
+1 to scoped_name
6 years, 9 months ago (2014-03-14 00:44:41 UTC) #7
mtomasz
On 2014/03/14 00:44:41, noelallen wrote: > +1 to scoped_name Talked to @nbarth, and this would ...
6 years, 9 months ago (2014-03-14 00:49:46 UTC) #8
mtomasz
On 2014/03/14 00:49:46, mtomasz wrote: > On 2014/03/14 00:44:41, noelallen wrote: > > +1 to ...
6 years, 9 months ago (2014-03-14 00:50:24 UTC) #9
Nils Barth (inactive)
https://codereview.chromium.org/197873009/diff/1/ppapi/generators/idl_parser.py File ppapi/generators/idl_parser.py (right): https://codereview.chromium.org/197873009/diff/1/ppapi/generators/idl_parser.py#newcode275 ppapi/generators/idl_parser.py:275: """typeref : SYMBOL Discussed offline; syntactically they're the same, ...
6 years, 9 months ago (2014-03-14 00:52:10 UTC) #10
mtomasz
On 2014/03/14 00:52:10, Nils Barth wrote: > https://codereview.chromium.org/197873009/diff/1/ppapi/generators/idl_parser.py > File ppapi/generators/idl_parser.py (right): > > https://codereview.chromium.org/197873009/diff/1/ppapi/generators/idl_parser.py#newcode275 ...
6 years, 9 months ago (2014-03-14 00:58:58 UTC) #11
mtomasz
On 2014/03/14 00:58:58, mtomasz wrote: > On 2014/03/14 00:52:10, Nils Barth wrote: > > > ...
6 years, 9 months ago (2014-03-14 01:37:47 UTC) #12
Nils Barth (inactive)
On 2014/03/14 01:37:47, mtomasz wrote: > Done. I introduced the scoped_name grammars and aliased namespace_name ...
6 years, 9 months ago (2014-03-14 01:40:41 UTC) #13
mtomasz
The CQ bit was checked by mtomasz@chromium.org
6 years, 9 months ago (2014-03-14 01:55:33 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mtomasz@chromium.org/197873009/60001
6 years, 9 months ago (2014-03-14 01:56:05 UTC) #15
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-14 02:04:13 UTC) #16
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.chromium on win_chromium_compile_dbg
6 years, 9 months ago (2014-03-14 02:04:14 UTC) #17
mtomasz
On 2014/03/14 02:04:14, I haz the power (commit-bot) wrote: > Try jobs failed on following ...
6 years, 9 months ago (2014-03-14 05:11:10 UTC) #18
mtomasz
On 2014/03/14 05:11:10, mtomasz wrote: > On 2014/03/14 02:04:14, I haz the power (commit-bot) wrote: ...
6 years, 9 months ago (2014-03-14 06:00:29 UTC) #19
Nils Barth (inactive)
> On 2014/03/14 00:52:10, Nils Barth wrote: > > Discussed offline; syntactically they're the same, ...
6 years, 9 months ago (2014-03-17 05:12:37 UTC) #20
not at google - send to devlin
tests lgtm https://codereview.chromium.org/197873009/diff/60001/tools/json_schema_compiler/idl_schema_test.py File tools/json_schema_compiler/idl_schema_test.py (right): https://codereview.chromium.org/197873009/diff/60001/tools/json_schema_compiler/idl_schema_test.py#newcode105 tools/json_schema_compiler/idl_schema_test.py:105: expected = [{'name':'value', '$ref':'other_namespace.SomeType'}] nit: spaces after ...
6 years, 9 months ago (2014-03-17 14:00:28 UTC) #21
mtomasz
https://codereview.chromium.org/197873009/diff/60001/tools/json_schema_compiler/idl_schema_test.py File tools/json_schema_compiler/idl_schema_test.py (right): https://codereview.chromium.org/197873009/diff/60001/tools/json_schema_compiler/idl_schema_test.py#newcode105 tools/json_schema_compiler/idl_schema_test.py:105: expected = [{'name':'value', '$ref':'other_namespace.SomeType'}] On 2014/03/17 14:00:29, kalman wrote: ...
6 years, 9 months ago (2014-03-28 04:48:31 UTC) #22
mtomasz
On 2014/03/28 04:48:31, mtomasz wrote: > https://codereview.chromium.org/197873009/diff/60001/tools/json_schema_compiler/idl_schema_test.py > File tools/json_schema_compiler/idl_schema_test.py (right): > > https://codereview.chromium.org/197873009/diff/60001/tools/json_schema_compiler/idl_schema_test.py#newcode105 > ...
6 years, 9 months ago (2014-03-28 04:49:49 UTC) #23
Nils Barth (inactive)
Grammar suggestion. https://codereview.chromium.org/197873009/diff/80001/ppapi/generators/idl_parser.py File ppapi/generators/idl_parser.py (right): https://codereview.chromium.org/197873009/diff/80001/ppapi/generators/idl_parser.py#newcode277 ppapi/generators/idl_parser.py:277: """scoped_name : SYMBOL This should instead be: ...
6 years, 9 months ago (2014-03-28 05:01:19 UTC) #24
mtomasz
https://codereview.chromium.org/197873009/diff/80001/ppapi/generators/idl_parser.py File ppapi/generators/idl_parser.py (right): https://codereview.chromium.org/197873009/diff/80001/ppapi/generators/idl_parser.py#newcode277 ppapi/generators/idl_parser.py:277: """scoped_name : SYMBOL On 2014/03/28 05:01:19, Nils Barth wrote: ...
6 years, 9 months ago (2014-03-28 05:19:38 UTC) #25
Nils Barth (inactive)
https://codereview.chromium.org/197873009/diff/80001/ppapi/generators/idl_parser.py File ppapi/generators/idl_parser.py (right): https://codereview.chromium.org/197873009/diff/80001/ppapi/generators/idl_parser.py#newcode277 ppapi/generators/idl_parser.py:277: """scoped_name : SYMBOL Thanks! LGTM again!
6 years, 9 months ago (2014-03-28 05:25:13 UTC) #26
mtomasz
I just fixed schema_loader.cc, which didn't work for Chrome's API IDLs. The reason is that ...
6 years, 9 months ago (2014-03-28 07:32:44 UTC) #27
not at google - send to devlin
https://codereview.chromium.org/197873009/diff/110001/tools/json_schema_compiler/cc_generator.py File tools/json_schema_compiler/cc_generator.py (right): https://codereview.chromium.org/197873009/diff/110001/tools/json_schema_compiler/cc_generator.py#newcode689 tools/json_schema_compiler/cc_generator.py:689: underlying_type.item_type, # Pass ref. what does "Pass ref" mean? ...
6 years, 9 months ago (2014-03-28 18:42:24 UTC) #28
mtomasz
https://codereview.chromium.org/197873009/diff/110001/tools/json_schema_compiler/cc_generator.py File tools/json_schema_compiler/cc_generator.py (right): https://codereview.chromium.org/197873009/diff/110001/tools/json_schema_compiler/cc_generator.py#newcode804 tools/json_schema_compiler/cc_generator.py:804: # namespace. On 2014/03/28 18:42:25, kalman wrote: > It ...
6 years, 8 months ago (2014-03-29 04:22:52 UTC) #29
mtomasz
Done. @kalman: PTAL. Thanks. https://codereview.chromium.org/197873009/diff/110001/tools/json_schema_compiler/cc_generator.py File tools/json_schema_compiler/cc_generator.py (right): https://codereview.chromium.org/197873009/diff/110001/tools/json_schema_compiler/cc_generator.py#newcode689 tools/json_schema_compiler/cc_generator.py:689: underlying_type.item_type, # Pass ref. On ...
6 years, 8 months ago (2014-03-31 01:39:19 UTC) #30
not at google - send to devlin
https://codereview.chromium.org/197873009/diff/150001/tools/json_schema_compiler/cc_generator.py File tools/json_schema_compiler/cc_generator.py (left): https://codereview.chromium.org/197873009/diff/150001/tools/json_schema_compiler/cc_generator.py#oldcode813 tools/json_schema_compiler/cc_generator.py:813: self._type_helper.GetEnumNoneValue(type_))) if/when you do change this back, mind indenting ...
6 years, 8 months ago (2014-03-31 15:18:58 UTC) #31
Nils Barth (inactive)
(Minor style comment.) https://codereview.chromium.org/197873009/diff/150001/tools/json_schema_compiler/cc_generator.py File tools/json_schema_compiler/cc_generator.py (right): https://codereview.chromium.org/197873009/diff/150001/tools/json_schema_compiler/cc_generator.py#newcode807 tools/json_schema_compiler/cc_generator.py:807: cpp_type_namespace = (enum_type.namespace.unix_name On 2014/03/31 15:18:59, ...
6 years, 8 months ago (2014-04-01 01:39:16 UTC) #32
not at google - send to devlin
https://codereview.chromium.org/197873009/diff/150001/tools/json_schema_compiler/cc_generator.py File tools/json_schema_compiler/cc_generator.py (right): https://codereview.chromium.org/197873009/diff/150001/tools/json_schema_compiler/cc_generator.py#newcode807 tools/json_schema_compiler/cc_generator.py:807: cpp_type_namespace = (enum_type.namespace.unix_name On 2014/04/01 01:39:16, Nils Barth wrote: ...
6 years, 8 months ago (2014-04-01 01:40:24 UTC) #33
mtomasz
@kalman. PTAL one more time. I cleaned up and fixed cpp_type_generator.py. Thanks. https://codereview.chromium.org/197873009/diff/150001/tools/json_schema_compiler/cc_generator.py File tools/json_schema_compiler/cc_generator.py ...
6 years, 8 months ago (2014-04-03 21:50:21 UTC) #34
not at google - send to devlin
lgtm https://codereview.chromium.org/197873009/diff/210001/tools/json_schema_compiler/cpp_type_generator.py File tools/json_schema_compiler/cpp_type_generator.py (right): https://codereview.chromium.org/197873009/diff/210001/tools/json_schema_compiler/cpp_type_generator.py#newcode110 tools/json_schema_compiler/cpp_type_generator.py:110: elif (type_.property_type == PropertyType.ENUM or you can do ...
6 years, 8 months ago (2014-04-03 21:56:31 UTC) #35
mtomasz
https://codereview.chromium.org/197873009/diff/210001/tools/json_schema_compiler/cpp_type_generator.py File tools/json_schema_compiler/cpp_type_generator.py (right): https://codereview.chromium.org/197873009/diff/210001/tools/json_schema_compiler/cpp_type_generator.py#newcode110 tools/json_schema_compiler/cpp_type_generator.py:110: elif (type_.property_type == PropertyType.ENUM or On 2014/04/03 21:56:32, kalman ...
6 years, 8 months ago (2014-04-03 22:33:37 UTC) #36
mtomasz
The CQ bit was checked by mtomasz@chromium.org
6 years, 8 months ago (2014-04-03 22:33:44 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mtomasz@chromium.org/197873009/230001
6 years, 8 months ago (2014-04-03 22:35:15 UTC) #38
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-04-03 23:38:54 UTC) #39
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.chromium on linux_chromium_rel
6 years, 8 months ago (2014-04-03 23:38:55 UTC) #40
mtomasz
The CQ bit was checked by mtomasz@chromium.org
6 years, 8 months ago (2014-04-03 23:55:54 UTC) #41
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mtomasz@chromium.org/197873009/230001
6 years, 8 months ago (2014-04-03 23:56:45 UTC) #42
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-04-04 00:31:02 UTC) #43
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.chromium on mac_chromium_rel
6 years, 8 months ago (2014-04-04 00:31:03 UTC) #44
mtomasz
The CQ bit was checked by mtomasz@chromium.org
6 years, 8 months ago (2014-04-04 00:43:21 UTC) #45
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mtomasz@chromium.org/197873009/230001
6 years, 8 months ago (2014-04-04 00:45:28 UTC) #46
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-04-04 01:04:20 UTC) #47
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.chromium on linux_chromium_chromeos_rel
6 years, 8 months ago (2014-04-04 01:04:21 UTC) #48
mtomasz
The CQ bit was checked by mtomasz@chromium.org
6 years, 8 months ago (2014-04-04 19:47:59 UTC) #49
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mtomasz@chromium.org/197873009/260001
6 years, 8 months ago (2014-04-04 19:48:36 UTC) #50
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mtomasz@chromium.org/197873009/260001
6 years, 8 months ago (2014-04-04 21:26:28 UTC) #51
commit-bot: I haz the power
6 years, 8 months ago (2014-04-04 23:02:45 UTC) #52
Message was sent while issue was closed.
Change committed as 261911

Powered by Google App Engine
This is Rietveld 408576698