Remove typeNeedsRooting().

It is only used once, in a case where it can never have an effect: in case
for it to do something, both returnType.isDictionary() and
returnType.isGeckoInterface() would need to be true at the same time.
This commit is contained in:
Ms2ger 2017-02-08 12:39:38 +01:00
parent 7d5320f419
commit 5230ad2c61

View file

@ -548,11 +548,6 @@ def typeIsSequenceOrHasSequenceMember(type):
return False
def typeNeedsRooting(type, descriptorProvider):
return (type.isGeckoInterface() and
descriptorProvider.getDescriptor(type.unroll().inner.identifier.name).needsRooting)
def union_native_type(t):
name = t.unroll().name
return 'UnionTypes::%s' % name
@ -1422,8 +1417,6 @@ def getRetvalDeclarationForType(returnType, descriptorProvider):
nullable = returnType.nullable()
dictName = returnType.inner.name if nullable else returnType.name
result = CGGeneric(dictName)
if typeNeedsRooting(returnType, descriptorProvider):
raise TypeError("We don't support rootable dictionaries return values")
if nullable:
result = CGWrapper(result, pre="Option<", post=">")
return result