mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
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:
parent
7d5320f419
commit
5230ad2c61
1 changed files with 0 additions and 7 deletions
|
@ -548,11 +548,6 @@ def typeIsSequenceOrHasSequenceMember(type):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
def typeNeedsRooting(type, descriptorProvider):
|
|
||||||
return (type.isGeckoInterface() and
|
|
||||||
descriptorProvider.getDescriptor(type.unroll().inner.identifier.name).needsRooting)
|
|
||||||
|
|
||||||
|
|
||||||
def union_native_type(t):
|
def union_native_type(t):
|
||||||
name = t.unroll().name
|
name = t.unroll().name
|
||||||
return 'UnionTypes::%s' % name
|
return 'UnionTypes::%s' % name
|
||||||
|
@ -1422,8 +1417,6 @@ def getRetvalDeclarationForType(returnType, descriptorProvider):
|
||||||
nullable = returnType.nullable()
|
nullable = returnType.nullable()
|
||||||
dictName = returnType.inner.name if nullable else returnType.name
|
dictName = returnType.inner.name if nullable else returnType.name
|
||||||
result = CGGeneric(dictName)
|
result = CGGeneric(dictName)
|
||||||
if typeNeedsRooting(returnType, descriptorProvider):
|
|
||||||
raise TypeError("We don't support rootable dictionaries return values")
|
|
||||||
if nullable:
|
if nullable:
|
||||||
result = CGWrapper(result, pre="Option<", post=">")
|
result = CGWrapper(result, pre="Option<", post=">")
|
||||||
return result
|
return result
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue