aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings/codegen/Configuration.py
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2016-06-10 10:53:35 -0500
committerGitHub <noreply@github.com>2016-06-10 10:53:35 -0500
commit08a55e29511a2b26b7ae26ebb0b9271f80e2a7bd (patch)
tree502483f3666037c9a636a02c921ffb6e6b32897a /components/script/dom/bindings/codegen/Configuration.py
parent2fb8525919a72a1e1d5c873fb18a97c67c93bd95 (diff)
parentfda011923eda8cc8553ab480ff6340c69b409583 (diff)
downloadservo-08a55e29511a2b26b7ae26ebb0b9271f80e2a7bd.tar.gz
servo-08a55e29511a2b26b7ae26ebb0b9271f80e2a7bd.zip
Auto merge of #11214 - farodin91:windowproxy, r=jdm
Support WindowProxy return values in bindings Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy --faster` does not report any errors - [x] These changes fix #10965 (github issue number if applicable). Either: - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11214) <!-- Reviewable:end -->
Diffstat (limited to 'components/script/dom/bindings/codegen/Configuration.py')
-rw-r--r--components/script/dom/bindings/codegen/Configuration.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/components/script/dom/bindings/codegen/Configuration.py b/components/script/dom/bindings/codegen/Configuration.py
index 3ee7fb37e77..7aad0f75f75 100644
--- a/components/script/dom/bindings/codegen/Configuration.py
+++ b/components/script/dom/bindings/codegen/Configuration.py
@@ -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)