diff options
author | Anthony Ramine <n.oxyde@gmail.com> | 2016-01-06 00:48:22 +0100 |
---|---|---|
committer | Anthony Ramine <n.oxyde@gmail.com> | 2016-01-12 12:34:18 +0100 |
commit | d52948dfd5b01f4b9353fbd5055888c29b1538db (patch) | |
tree | 79c992377cad4886ca88fc1f5b77aa71296f3cf3 /components/script/dom | |
parent | 7693aecf1521c17e59ca8f6863b91cd7ee1c4074 (diff) | |
download | servo-d52948dfd5b01f4b9353fbd5055888c29b1538db.tar.gz servo-d52948dfd5b01f4b9353fbd5055888c29b1538db.zip |
Introduce Descriptor.prototypeDepth
Diffstat (limited to 'components/script/dom')
-rw-r--r-- | components/script/dom/bindings/codegen/CodegenRust.py | 4 | ||||
-rw-r--r-- | components/script/dom/bindings/codegen/Configuration.py | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/components/script/dom/bindings/codegen/CodegenRust.py b/components/script/dom/bindings/codegen/CodegenRust.py index c3dc4d2311a..166ce3ab02f 100644 --- a/components/script/dom/bindings/codegen/CodegenRust.py +++ b/components/script/dom/bindings/codegen/CodegenRust.py @@ -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: diff --git a/components/script/dom/bindings/codegen/Configuration.py b/components/script/dom/bindings/codegen/Configuration.py index 2106ff4adee..ac78e52c071 100644 --- a/components/script/dom/bindings/codegen/Configuration.py +++ b/components/script/dom/bindings/codegen/Configuration.py @@ -296,6 +296,7 @@ class Descriptor(DescriptorProvider): while parent: self.prototypeChain.insert(0, parent.identifier.name) parent = parent.parent + self.prototypeDepth = len(self.prototypeChain) - 1 config.maxProtoChainLength = max(config.maxProtoChainLength, len(self.prototypeChain)) |