mirror of
https://github.com/servo/servo.git
synced 2025-06-17 04:44:28 +00:00
Reorder GetProtoObject.
This commit is contained in:
parent
d08ad3c243
commit
b32c157904
1 changed files with 6 additions and 5 deletions
|
@ -2534,7 +2534,7 @@ class CGGetPerInterfaceObject(CGAbstractMethod):
|
|||
args = [Argument('*JSContext', 'aCx'), Argument('*JSObject', 'aGlobal'),
|
||||
Argument('*JSObject', 'aReceiver')]
|
||||
CGAbstractMethod.__init__(self, descriptor, name,
|
||||
'*JSObject', args, inline=True, pub=pub)
|
||||
'*JSObject', args, pub=pub)
|
||||
self.id = idPrefix + "id::" + self.descriptor.name
|
||||
def definition_body(self):
|
||||
return """
|
||||
|
@ -4543,6 +4543,11 @@ class CGDescriptor(CGThing):
|
|||
assert not descriptor.concrete or descriptor.interface.hasInterfacePrototypeObject()
|
||||
|
||||
cgThings = []
|
||||
if descriptor.interface.hasInterfacePrototypeObject():
|
||||
cgThings.append(CGGetProtoObjectMethod(descriptor))
|
||||
else:
|
||||
cgThings.append(CGGetConstructorObjectMethod(descriptor))
|
||||
|
||||
if descriptor.interface.hasInterfacePrototypeObject():
|
||||
(hasMethod, hasGetter, hasLenientGetter,
|
||||
hasSetter, hasLenientSetter) = False, False, False, False, False
|
||||
|
@ -4586,10 +4591,6 @@ class CGDescriptor(CGThing):
|
|||
properties = PropertyArrays(descriptor)
|
||||
cgThings.append(CGGeneric(define=str(properties)))
|
||||
cgThings.append(CGCreateInterfaceObjectsMethod(descriptor, properties))
|
||||
if descriptor.interface.hasInterfacePrototypeObject():
|
||||
cgThings.append(CGGetProtoObjectMethod(descriptor))
|
||||
else:
|
||||
cgThings.append(CGGetConstructorObjectMethod(descriptor))
|
||||
|
||||
# Set up our Xray callbacks as needed.
|
||||
if descriptor.interface.hasInterfacePrototypeObject():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue