Support WindowProxy return values in bindings

unscopable
This commit is contained in:
Jansen Jan 2016-05-17 23:46:04 +02:00
parent 3acb9540ff
commit fda011923e
11 changed files with 69 additions and 61 deletions

View file

@ -173,6 +173,7 @@ class Descriptor(DescriptorProvider):
# Read the desc, and fill in the relevant defaults.
ifaceName = self.interface.identifier.name
typeName = desc.get('nativeType', ifaceName)
# Callback types do not use JS smart pointers, so we should not use the
# built-in rooting mechanisms for them.
@ -184,12 +185,13 @@ class Descriptor(DescriptorProvider):
self.nativeType = ty
else:
self.needsRooting = True
self.returnType = "Root<%s>" % ifaceName
self.argumentType = "&%s" % ifaceName
self.nativeType = "*const %s" % ifaceName
self.returnType = "Root<%s>" % typeName
self.argumentType = "&%s" % typeName
self.nativeType = "*const %s" % typeName
self.concreteType = ifaceName
self.concreteType = typeName
self.register = desc.get('register', True)
self.path = desc.get('path', 'dom::types::%s' % typeName)
self.outerObjectHook = desc.get('outerObjectHook', 'None')
self.proxy = False
self.weakReferenceable = desc.get('weakReferenceable', False)