summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/common/extensions/api/experimental.idltest.idl6
-rw-r--r--tools/json_schema_compiler/idl_schema.py6
2 files changed, 7 insertions, 5 deletions
diff --git a/chrome/common/extensions/api/experimental.idltest.idl b/chrome/common/extensions/api/experimental.idltest.idl
index 4e496c1..bfecbd3 100644
--- a/chrome/common/extensions/api/experimental.idltest.idl
+++ b/chrome/common/extensions/api/experimental.idltest.idl
@@ -7,13 +7,13 @@
[nodoc] namespace experimental.idltest {
callback LongArrayCallback = void(long[] array);
- callback ArrayBufferCallback = void([instanceOf=ArrayBuffer] object buffer);
+ callback ArrayBufferCallback = void(ArrayBuffer buffer);
interface Functions {
// Functions for testing binary data request/response parameters. The first
// two just return back the bytes they were passed in an array.
- static void sendArrayBuffer([instanceOf=ArrayBuffer] object input,
- LongArrayCallback cb);
+ static void sendArrayBuffer(ArrayBuffer input, LongArrayCallback cb);
+
// TODO(asargent) - we currently can't have [instanceOf=ArrayBufferView],
// I think because ArrayBufferView isn't an instantiable type. The best
// we might be able to do is have a 'choices' list including all the
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'