Allow sequence of nullable dictionary items in webidl

of type "sequence<Dict?> x"
This commit is contained in:
Kunal Mohan 2020-05-29 19:46:35 +05:30
parent 1a61937031
commit f014f15d4e

View file

@ -1134,7 +1134,7 @@ def getJSToNativeConversionInfo(type, descriptorProvider, failureCode=None,
if type.isDictionary():
# There are no nullable dictionaries
assert not type.nullable()
assert not type.nullable() or (isMember and isMember != "Dictionary")
typeName = "%s::%s" % (CGDictionary.makeModuleName(type.inner),
CGDictionary.makeDictionaryName(type.inner))
@ -6645,7 +6645,10 @@ class CGDictionary(CGThing):
@staticmethod
def makeDictionaryName(dictionary):
return dictionary.identifier.name
if isinstance(dictionary, IDLWrapperType):
return CGDictionary.makeDictionaryName(dictionary.inner)
else:
return dictionary.identifier.name
def makeClassName(self, dictionary):
return self.makeDictionaryName(dictionary)