mirror of
https://github.com/servo/servo.git
synced 2025-07-24 15:50:21 +01:00
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.
This commit is contained in:
parent
2c4d5da866
commit
ca979e115b
3 changed files with 31 additions and 18 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue