mirror of
https://github.com/servo/servo.git
synced 2025-07-25 08:10:21 +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
|
||||
|
||||
|
||||
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue