aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings/codegen/CodegenRust.py
diff options
context:
space:
mode:
authorMs2ger <Ms2ger@gmail.com>2017-02-08 12:39:38 +0100
committerMs2ger <Ms2ger@gmail.com>2017-02-08 12:39:38 +0100
commit5230ad2c61cec18034bb58a8745b7f330f2049da (patch)
tree66faca3d3e4788d73c37af6a1909f3bef5417557 /components/script/dom/bindings/codegen/CodegenRust.py
parent7d5320f419bd423bdab7c645c08ea3e57d031ab3 (diff)
downloadservo-5230ad2c61cec18034bb58a8745b7f330f2049da.tar.gz
servo-5230ad2c61cec18034bb58a8745b7f330f2049da.zip
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.
Diffstat (limited to 'components/script/dom/bindings/codegen/CodegenRust.py')
-rw-r--r--components/script/dom/bindings/codegen/CodegenRust.py7
1 files changed, 0 insertions, 7 deletions
diff --git a/components/script/dom/bindings/codegen/CodegenRust.py b/components/script/dom/bindings/codegen/CodegenRust.py
index 9e96c932f48..b46d44c5982 100644
--- a/components/script/dom/bindings/codegen/CodegenRust.py
+++ b/components/script/dom/bindings/codegen/CodegenRust.py
@@ -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