Introduce Descriptor.prototypeDepth

This commit is contained in:
Anthony Ramine 2016-01-06 00:48:22 +01:00
parent 7693aecf15
commit d52948dfd5
2 changed files with 3 additions and 2 deletions

View file

@ -2283,8 +2283,8 @@ class CGIDLInterface(CGThing):
name = self.descriptor.name
if (interface.getUserData("hasConcreteDescendant", False) or
interface.getUserData("hasProxyDescendant", False)):
depth = len(self.descriptor.prototypeChain)
check = "class.interface_chain[%s] == PrototypeList::ID::%s" % (depth - 1, name)
depth = self.descriptor.prototypeDepth
check = "class.interface_chain[%s] == PrototypeList::ID::%s" % (depth, name)
elif self.descriptor.proxy:
check = "class as *const _ == &Class as *const _"
else: