Bug 683096: Make arrays of nsQIResults work. r=ted
authorKyle Huey <khuey@kylehuey.com>
Sat, 03 Sep 2011 09:53:48 -0400
changeset 76534 a351ae35f2c469e32411d6f42a5e164de6ac2f41
parent 76533 e1d7cac1fa83d6d3e008171dcdf019ad3dd21d42
child 76535 2cd38970b65ad4a9520d0928151977029b591728
push id1699
push userbmo@edmorley.co.uk
push dateMon, 05 Sep 2011 00:19:59 +0000
treeherdermozilla-inbound@6f99ff6c4c86 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted
bugs683096
milestone9.0a1
first release with
nightly linux32
a351ae35f2c4 / 9.0a1 / 20110904030822 / files
nightly linux64
a351ae35f2c4 / 9.0a1 / 20110904030822 / files
nightly mac
a351ae35f2c4 / 9.0a1 / 20110904030822 / files
nightly win32
a351ae35f2c4 / 9.0a1 / 20110904030822 / files
nightly win64
a351ae35f2c4 / 9.0a1 / 20110904030822 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 683096: Make arrays of nsQIResults work. r=ted
xpcom/idl-parser/typelib.py
--- a/xpcom/idl-parser/typelib.py
+++ b/xpcom/idl-parser/typelib.py
@@ -89,17 +89,19 @@ def build_interface(iface, ifaces):
             else:
                   tag = TypeMap[type.name]
                   isPtr = (tag == xpt.Type.Tags.char_ptr or tag == xpt.Type.Tags.wchar_t_ptr)
                   return xpt.SimpleType(tag,
                                         pointer=isPtr,
                                         reference=False)
 
         if isinstance(type, xpidl.Array):
-            return xpt.ArrayType(get_type(type.type, calltype), size_is,
+            # NB: For an Array<T> we pass down the iid_is to get the type of T.
+            #     This allows Arrays of InterfaceIs types to work.
+            return xpt.ArrayType(get_type(type.type, calltype, iid_is), size_is,
                                  #XXXkhuey length_is duplicates size_is (bug 677788),
                                  size_is)
 
         if isinstance(type, xpidl.Interface) or isinstance(type, xpidl.Forward):
             xptiface = None
             for i in ifaces:
                 if i.name == type.name:
                     xptiface = i