Skip to content

Commit

Permalink
Remove typeNeedsRooting().
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Ms2ger committed Feb 8, 2017
1 parent 7d5320f commit 5230ad2
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions components/script/dom/bindings/codegen/CodegenRust.py
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 5230ad2

Please sign in to comment.