diff options
author | Moonchild <moonchild@palemoon.org> | 2021-07-15 23:13:31 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2021-07-15 23:13:31 +0000 |
commit | feafc2f129df921f9e2954f0a21b1060588e4a0f (patch) | |
tree | 248d2f8df51e96c0d518ae5c782ad801ec53702f /dom/bindings/Codegen.py | |
parent | 84825468041d590ff8c660c42cf93b0d2243ad52 (diff) | |
parent | c198ef11b9d2697501b3ea4cbcab98e4dad48a9d (diff) | |
download | uxp-feafc2f129df921f9e2954f0a21b1060588e4a0f.tar.gz |
Merge branch 'master' into releaseRELBASE_20210719RC_20210715
Diffstat (limited to 'dom/bindings/Codegen.py')
-rw-r--r-- | dom/bindings/Codegen.py | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/dom/bindings/Codegen.py b/dom/bindings/Codegen.py index c9a5e9f419..42ce94fcb4 100644 --- a/dom/bindings/Codegen.py +++ b/dom/bindings/Codegen.py @@ -2321,22 +2321,11 @@ class MethodDefiner(PropertyDefiner): if len(signatures) > 1 or len(signatures[0][1]) > 1 or not argTypeIsIID(signatures[0][1][0]): raise TypeError("There should be only one queryInterface method with 1 argument of type IID") - # Make sure to not stick QueryInterface on abstract interfaces that - # have hasXPConnectImpls (like EventTarget). So only put it on - # interfaces that are concrete and all of whose ancestors are abstract. - def allAncestorsAbstract(iface): - if not iface.parent: - return True - desc = self.descriptor.getDescriptor(iface.parent.identifier.name) - if desc.concrete: - return False - return allAncestorsAbstract(iface.parent) + # Make sure to not stick QueryInterface on abstract interfaces. if (not self.descriptor.interface.hasInterfacePrototypeObject() or - not self.descriptor.concrete or - not allAncestorsAbstract(self.descriptor.interface)): + not self.descriptor.concrete): raise TypeError("QueryInterface is only supported on " - "interfaces that are concrete and all " - "of whose ancestors are abstract: " + + "interfaces that are concrete: " + self.descriptor.name) condition = "WantsQueryInterface<%s>::Enabled" % descriptor.nativeType self.regular.append({ |