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

Unified Diff: tools/json_schema_compiler/idl_schema.py

Issue 10560027: Improve handling of ArrayBuffers in composite objects. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing tests. Created 8 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 | « tools/json_schema_compiler/cpp_type_generator.py ('k') | no next file » | 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 d65746a210af0d24649677719f8291107a474fa6..28f2a3b61449776d270ec161a0b91e2995c042fa 100644
--- a/tools/json_schema_compiler/idl_schema.py
+++ b/tools/json_schema_compiler/idl_schema.py
@@ -190,16 +190,17 @@ class Typeref(object):
properties['type'] = 'integer'
elif self.typeref == 'any':
properties['type'] = 'any'
- elif self.typeref == 'ArrayBuffer' or self.typeref == 'object':
+ elif self.typeref == 'object':
properties['type'] = 'object'
if 'additionalProperties' not in properties:
properties['additionalProperties'] = {}
properties['additionalProperties']['type'] = 'any'
instance_of = self.parent.GetProperty('instanceOf')
- if self.typeref == 'ArrayBuffer':
- properties['isInstanceOf'] = 'ArrayBuffer'
- elif instance_of:
+ if instance_of:
properties['isInstanceOf'] = instance_of
+ elif self.typeref == 'ArrayBuffer':
+ properties['type'] = 'binary'
+ properties['isInstanceOf'] = 'ArrayBuffer'
elif self.typeref is None:
properties['type'] = 'function'
else:
« no previous file with comments | « tools/json_schema_compiler/cpp_type_generator.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698