diff options
Diffstat (limited to 'components/script/dom/bindings/codegen/Configuration.py')
-rw-r--r-- | components/script/dom/bindings/codegen/Configuration.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/components/script/dom/bindings/codegen/Configuration.py b/components/script/dom/bindings/codegen/Configuration.py index 6e71bd4bd00..835bcbe4774 100644 --- a/components/script/dom/bindings/codegen/Configuration.py +++ b/components/script/dom/bindings/codegen/Configuration.py @@ -194,9 +194,17 @@ class Descriptor(DescriptorProvider): typeName = desc.get('nativeType', nativeTypeDefault) - # Callback types do not use JS smart pointers, so we should not use the + spiderMonkeyInterface = desc.get('spiderMonkeyInterface', False) + + # Callback and SpiderMonkey types do not use JS smart pointers, so we should not use the # built-in rooting mechanisms for them. - if self.interface.isCallback(): + if spiderMonkeyInterface: + self.needsRooting = False + self.returnType = 'Rc<%s>' % typeName + self.argumentType = '&%s' % typeName + self.nativeType = typeName + pathDefault = 'dom::types::%s' % typeName + elif self.interface.isCallback(): self.needsRooting = False ty = 'dom::bindings::codegen::Bindings::%sBinding::%s' % (ifaceName, ifaceName) pathDefault = ty |