diff options
author | Kunal Mohan <kunalmohan99@gmail.com> | 2020-05-29 19:46:35 +0530 |
---|---|---|
committer | Kunal Mohan <kunalmohan99@gmail.com> | 2020-05-30 11:01:13 +0530 |
commit | f014f15d4eaeb52e38faee15dc9a4d0f700d1d7c (patch) | |
tree | e3b42fc81638129ebae332d3f10f4c59c16e8bfe /components/script | |
parent | 1a6193703134512b8d09b54a85bf58b3df82a372 (diff) | |
download | servo-f014f15d4eaeb52e38faee15dc9a4d0f700d1d7c.tar.gz servo-f014f15d4eaeb52e38faee15dc9a4d0f700d1d7c.zip |
Allow sequence of nullable dictionary items in webidl
of type "sequence<Dict?> x"
Diffstat (limited to 'components/script')
-rw-r--r-- | components/script/dom/bindings/codegen/CodegenRust.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/components/script/dom/bindings/codegen/CodegenRust.py b/components/script/dom/bindings/codegen/CodegenRust.py index 597e5611f74..de97e2c9ea9 100644 --- a/components/script/dom/bindings/codegen/CodegenRust.py +++ b/components/script/dom/bindings/codegen/CodegenRust.py @@ -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) |