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

Unified Diff: tools/json_schema_compiler/idl_schema.py

Issue 2930703003: Extensions: Support forIOThread function schema attribute for IDL files. (Closed)
Patch Set: -- Created 3 years, 6 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
« no previous file with comments | « no previous file | tools/json_schema_compiler/idl_schema_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/json_schema_compiler/idl_schema.py
diff --git a/tools/json_schema_compiler/idl_schema.py b/tools/json_schema_compiler/idl_schema.py
index fcad49bef4e2fde5eb75f8fa359c5ee2d97e3266..7bbe84246768df23684c6ed6f9784f6c238e7bb5 100755
--- a/tools/json_schema_compiler/idl_schema.py
+++ b/tools/json_schema_compiler/idl_schema.py
@@ -182,12 +182,15 @@ class Member(object):
name = self.node.GetName()
if self.node.GetProperty('deprecated'):
properties['deprecated'] = self.node.GetProperty('deprecated')
- if self.node.GetProperty('allowAmbiguousOptionalArguments'):
- properties['allowAmbiguousOptionalArguments'] = True
- for property_name in ('OPTIONAL', 'nodoc', 'nocompile', 'nodart',
- 'nodefine'):
+
+ for property_name in ['allowAmbiguousOptionalArguments', 'forIOThread',
+ 'nodoc', 'nocompile', 'nodart', 'nodefine']:
if self.node.GetProperty(property_name):
- properties[property_name.lower()] = True
+ properties[property_name] = True
+
+ if self.node.GetProperty('OPTIONAL'):
+ properties['optional'] = True
+
for option_name, sanitizer in [
('maxListeners', int),
('supportsFilters', lambda s: s == 'true'),
« no previous file with comments | « no previous file | tools/json_schema_compiler/idl_schema_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698