Chromium Code Reviews| Index: tools/json_schema_compiler/model.py |
| diff --git a/tools/json_schema_compiler/model.py b/tools/json_schema_compiler/model.py |
| index e0147b5b4889fb2a86b59a74648a4deb24316051..ba858130fdeb1d22fd0999ae45d893006d631e1b 100644 |
| --- a/tools/json_schema_compiler/model.py |
| +++ b/tools/json_schema_compiler/model.py |
| @@ -317,8 +317,10 @@ class Function(object): |
| self.filters = [GeneratePropertyFromParam(filter_instance) |
| for filter_instance in json.get('filters', [])] |
| callback_param = None |
| - for param in json.get('parameters', []): |
| - if param.get('type') == 'function': |
| + params = json.get('parameters', []) |
| + for i in range(len(params)): |
|
Dan Beam
2017/01/04 03:19:49
params = json.get('parameters', [])
for i, param i
|
| + param = params[i] |
| + if param.get('type') == 'function' and i == len(params) - 1: |
| if callback_param: |
| # No ParseException because the webstore has this. |
| # Instead, pretend all intermediate callbacks are properties. |