aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings/codegen/Configuration.py
diff options
context:
space:
mode:
authorAnthony Ramine <n.oxyde@gmail.com>2016-01-23 23:32:51 +0100
committerAnthony Ramine <n.oxyde@gmail.com>2016-02-25 15:15:44 +0100
commitca979e115b087cf627baf2be8d54ea47b1f773a1 (patch)
tree7dcfe3f4380a468f766ec2291dc162530bd2d061 /components/script/dom/bindings/codegen/Configuration.py
parent2c4d5da86685537b550f05a6a142c6543320ab0f (diff)
downloadservo-ca979e115b087cf627baf2be8d54ea47b1f773a1.tar.gz
servo-ca979e115b087cf627baf2be8d54ea47b1f773a1.zip
Cache legacy callback interface objects in proto_or_icache_array
We need them to be cached to not instantiate them multiple times with lazy initialisation.
Diffstat (limited to 'components/script/dom/bindings/codegen/Configuration.py')
-rw-r--r--components/script/dom/bindings/codegen/Configuration.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/components/script/dom/bindings/codegen/Configuration.py b/components/script/dom/bindings/codegen/Configuration.py
index 762998b91ac..c634665c410 100644
--- a/components/script/dom/bindings/codegen/Configuration.py
+++ b/components/script/dom/bindings/codegen/Configuration.py
@@ -345,6 +345,10 @@ class Descriptor(DescriptorProvider):
return (self.interface.getUserData("hasConcreteDescendant", False) or
self.interface.getUserData("hasProxyDescendant", False))
+ def shouldHaveGetConstructorObjectMethod(self):
+ assert self.interface.hasInterfaceObject()
+ return self.interface.isCallback() or self.hasDescendants()
+
def isGlobal(self):
"""
Returns true if this is the primary interface for a global object