summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorasargent@chromium.org <asargent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-10 20:25:06 +0000
committerasargent@chromium.org <asargent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-10 20:25:06 +0000
commit0d3e556d8ae894204344beba3842edfda2273e62 (patch)
tree6f895121d2775b5f815c2b2f8c86f77afd9df80a /tools
parent192aa69490684b44e51bbada6fd9e80e13abb554 (diff)
downloadchromium_src-0d3e556d8ae894204344beba3842edfda2273e62.zip
chromium_src-0d3e556d8ae894204344beba3842edfda2273e62.tar.gz
chromium_src-0d3e556d8ae894204344beba3842edfda2273e62.tar.bz2
Add syntactic sugar for ArrayBuffer as a type in IDL api definitions.
BUG=127488 TEST=Existing browser tests should still pass Review URL: https://chromiumcodereview.appspot.com/10378084 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@136375 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools')
-rw-r--r--tools/json_schema_compiler/idl_schema.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/json_schema_compiler/idl_schema.py b/tools/json_schema_compiler/idl_schema.py
index 087b2f4..31a8890 100644
--- a/tools/json_schema_compiler/idl_schema.py
+++ b/tools/json_schema_compiler/idl_schema.py
@@ -167,13 +167,15 @@ class Typeref(object):
properties['type'] = 'integer'
elif self.typeref == 'any':
properties['type'] = 'any'
- elif self.typeref == 'object':
+ elif self.typeref == 'ArrayBuffer' or self.typeref == 'object':
properties['type'] = 'object'
if 'additionalProperties' not in properties:
properties['additionalProperties'] = {}
properties['additionalProperties']['type'] = 'any'
instance_of = self.parent.GetProperty('instanceOf')
- if instance_of:
+ if self.typeref == 'ArrayBuffer':
+ properties['isInstanceOf'] = 'ArrayBuffer'
+ elif instance_of:
properties['isInstanceOf'] = instance_of
elif self.typeref is None:
properties['type'] = 'function'