aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings/codegen/CodegenRust.py
diff options
context:
space:
mode:
authorAnthony Ramine <n.oxyde@gmail.com>2015-12-16 00:40:37 +0100
committerAnthony Ramine <n.oxyde@gmail.com>2015-12-16 00:42:15 +0100
commit372da02a4273086ce52ea845f7cb4d0acea77742 (patch)
treeb87aad966ecfa2d0209d582bc1504c0eb4c72c50 /components/script/dom/bindings/codegen/CodegenRust.py
parent05e456d0d2b2c67dfdd7a593aa1514d6bf125b10 (diff)
downloadservo-372da02a4273086ce52ea845f7cb4d0acea77742.tar.gz
servo-372da02a4273086ce52ea845f7cb4d0acea77742.zip
Link [Abstract] to the existing concrete descriptor field
This makes codegen not emit anything strictly related to the interface which are never used in the case of abstract interfaces, such as the Wrap method or the DOMJSClass.
Diffstat (limited to 'components/script/dom/bindings/codegen/CodegenRust.py')
-rw-r--r--components/script/dom/bindings/codegen/CodegenRust.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/components/script/dom/bindings/codegen/CodegenRust.py b/components/script/dom/bindings/codegen/CodegenRust.py
index 199ec0c28ce..bb85fac6533 100644
--- a/components/script/dom/bindings/codegen/CodegenRust.py
+++ b/components/script/dom/bindings/codegen/CodegenRust.py
@@ -4986,7 +4986,8 @@ class CGDescriptor(CGThing):
cgThings.append(CGWrapMethod(descriptor))
if not descriptor.interface.isCallback():
- cgThings.append(CGIDLInterface(descriptor))
+ if descriptor.concrete or descriptor.hasDescendants():
+ cgThings.append(CGIDLInterface(descriptor))
cgThings.append(CGInterfaceTrait(descriptor))
if descriptor.weakReferenceable:
cgThings.append(CGWeakReferenceableTrait(descriptor))