Bug 1289315 - Fix union types for maplike/setlike/iterable in WebIDL parser; r=qdot
authorJonathan Chan <jchan@mozilla.com>
Wed, 27 Jul 2016 09:47:53 -0700
changeset 346960 ae6fac030deb0b8d2823cb59f87378056320eafb
parent 346959 43638c0b16bc06b2db70815e8165f6e1016c711b
child 346961 44d0ef641fa71923e29f50b130fd604144951d58
push id6389
push userraliiev@mozilla.com
push dateMon, 19 Sep 2016 13:38:22 +0000
treeherdermozilla-beta@01d67bfe6c81 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersqdot
bugs1289315
milestone50.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1289315 - Fix union types for maplike/setlike/iterable in WebIDL parser; r=qdot MozReview-Commit-ID: Bmn0CPfwUXZ
dom/bindings/Configuration.py
--- a/dom/bindings/Configuration.py
+++ b/dom/bindings/Configuration.py
@@ -706,16 +706,23 @@ def getTypesFromDescriptor(descriptor):
     types = []
     for s in signatures:
         assert len(s) == 2
         (returnType, arguments) = s
         types.append(returnType)
         types.extend(a.type for a in arguments)
 
     types.extend(a.type for a in members if a.isAttr())
+
+    if descriptor.interface.maplikeOrSetlikeOrIterable:
+        maplikeOrSetlikeOrIterable = descriptor.interface.maplikeOrSetlikeOrIterable
+        if maplikeOrSetlikeOrIterable.hasKeyType():
+            types.append(maplikeOrSetlikeOrIterable.keyType)
+        if maplikeOrSetlikeOrIterable.hasValueType():
+            types.append(maplikeOrSetlikeOrIterable.valueType)
     return types
 
 
 def getFlatTypes(types):
     retval = set()
     for type in types:
         type = type.unroll()
         if type.isUnion():