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

Unified Diff: tools/json_schema_compiler/model.py

Issue 2601333002: Update json_schema_compiler to handle the Automation extension API (Closed)
Patch Set: Fix select_to_speak Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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/10 22:54:43 for i, param in enumerate(params):
dmazzoni 2017/01/11 22:20:42 Done.
+ 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.
« tools/json_schema_compiler/js_util.py ('K') | « tools/json_schema_compiler/js_util.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698