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

Issue 10054039: Support array types for function and callback arguments in IDL APIs. (Closed)

Created:
8 years, 8 months ago by asargent_no_longer_on_chrome
Modified:
8 years, 8 months ago
Reviewers:
miket_OOO, Matt Perry
CC:
chromium-reviews, pam+watch_chromium.org
Visibility:
Public.

Description

Support array types for function and callback arguments in IDL APIs. I realized we completely omitted array support with our initial IDl work. This patch fixes that for 2 important cases, but doesn't yet add it in for dictionary members (that can be a separate patch). BUG=122875 TEST=Included unit tests should pass Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=132023

Patch Set 1 #

Patch Set 2 : cleanup #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+115 lines, -3 lines) Patch
M tools/json_schema_compiler/idl_schema.py View 1 2 chunks +13 lines, -2 lines 1 comment Download
A tools/json_schema_compiler/idl_schema_test.py View 1 chunk +47 lines, -0 lines 0 comments Download
M tools/json_schema_compiler/test/idl_basics.idl View 2 chunks +6 lines, -0 lines 0 comments Download
M tools/json_schema_compiler/test/idl_schemas_unittest.cc View 1 3 chunks +49 lines, -1 line 0 comments Download

Messages

Total messages: 7 (0 generated)
asargent_no_longer_on_chrome
8 years, 8 months ago (2012-04-12 03:38:59 UTC) #1
miket_OOO
lgtm Great!
8 years, 8 months ago (2012-04-12 15:21:34 UTC) #2
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/asargent@chromium.org/10054039/2001
8 years, 8 months ago (2012-04-12 15:48:50 UTC) #3
commit-bot: I haz the power
Change committed as 132023
8 years, 8 months ago (2012-04-12 18:39:30 UTC) #4
Matt Perry
http://codereview.chromium.org/10054039/diff/2001/tools/json_schema_compiler/idl_schema.py File tools/json_schema_compiler/idl_schema.py (right): http://codereview.chromium.org/10054039/diff/2001/tools/json_schema_compiler/idl_schema.py#newcode145 tools/json_schema_compiler/idl_schema.py:145: result = refs[self.typeref] What is this code path used ...
8 years, 8 months ago (2012-04-12 18:56:53 UTC) #5
asargent_no_longer_on_chrome
On 2012/04/12 18:56:53, Matt Perry wrote: > http://codereview.chromium.org/10054039/diff/2001/tools/json_schema_compiler/idl_schema.py > File tools/json_schema_compiler/idl_schema.py (right): > > http://codereview.chromium.org/10054039/diff/2001/tools/json_schema_compiler/idl_schema.py#newcode145 ...
8 years, 8 months ago (2012-04-12 23:14:24 UTC) #6
asargent_no_longer_on_chrome
8 years, 8 months ago (2012-04-12 23:52:28 UTC) #7
On 2012/04/12 23:14:24, Antony Sargent wrote:
> On 2012/04/12 18:56:53, Matt Perry wrote:
> >
>
http://codereview.chromium.org/10054039/diff/2001/tools/json_schema_compiler/...
> > File tools/json_schema_compiler/idl_schema.py (right):
> > 
> >
>
http://codereview.chromium.org/10054039/diff/2001/tools/json_schema_compiler/...
> > tools/json_schema_compiler/idl_schema.py:145: result = refs[self.typeref]
> > What is this code path used for? Doesn't this miss the array case? It seems
> like
> > for an array, we should do properties['items'] = refs[self.typeref]
> 
> Nice catch - thanks for the eagle eyes! It happens to work in most cases
because
> this 'refs' mechanism is only used for callbacks, but I think you are right
that
> this is a bug for that case. I'm looking into creating a test to demonstrate
the
> problem, and will then create a patch to fix it.

To be more clear, I think this would break in the case where you wanted to have
an array of callbacks, e.g.

callback MyCallback = void(long x);
static void foo(MyCallback[] callback_list);

Powered by Google App Engine
This is Rietveld 408576698