aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings/codegen/CodegenRust.py
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2015-12-16 15:19:25 +0530
committerbors-servo <lbergstrom+bors@mozilla.com>2015-12-16 15:19:25 +0530
commit9c4ca39ebe57502b74d75aa9d6953b017d884f54 (patch)
tree424666fbb21011c594cbbd48b172ec989a5bccbb /components/script/dom/bindings/codegen/CodegenRust.py
parent1695c0ad27e4c9c062e26a5db154521e400ecbd9 (diff)
parentc1718a0b1fb227df2fcad4394a65d430af404ab0 (diff)
downloadservo-9c4ca39ebe57502b74d75aa9d6953b017d884f54.tar.gz
servo-9c4ca39ebe57502b74d75aa9d6953b017d884f54.zip
Auto merge of #8055 - nox:rm-webidl-patches, r=Ms2ger
Remove all our patches to the WebIDL parser All the tweaks we need can just be made through Configuration.py. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8055) <!-- Reviewable:end -->
Diffstat (limited to 'components/script/dom/bindings/codegen/CodegenRust.py')
-rw-r--r--components/script/dom/bindings/codegen/CodegenRust.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/components/script/dom/bindings/codegen/CodegenRust.py b/components/script/dom/bindings/codegen/CodegenRust.py
index e3f15872603..c84be59ad7c 100644
--- a/components/script/dom/bindings/codegen/CodegenRust.py
+++ b/components/script/dom/bindings/codegen/CodegenRust.py
@@ -23,6 +23,7 @@ from WebIDL import (
from Configuration import (
MemberIsUnforgeable,
+ getModuleFromObject,
getTypesFromCallback,
getTypesFromDescriptor,
getTypesFromDictionary,
@@ -920,7 +921,7 @@ def getJSToNativeConversionInfo(type, descriptorProvider, failureCode=None,
assert not type.treatNonObjectAsNull() or not type.treatNonCallableAsNull()
callback = type.unroll().callback
- declType = CGGeneric('%s::%s' % (callback.module(), callback.identifier.name))
+ declType = CGGeneric('%s::%s' % (getModuleFromObject(callback), callback.identifier.name))
finalDeclType = CGTemplatedType("Rc", declType)
conversion = CGCallbackTempRoot(declType.define())
@@ -1281,7 +1282,7 @@ def getRetvalDeclarationForType(returnType, descriptorProvider):
return result
if returnType.isCallback():
callback = returnType.unroll().callback
- result = CGGeneric('Rc<%s::%s>' % (callback.module(), callback.identifier.name))
+ result = CGGeneric('Rc<%s::%s>' % (getModuleFromObject(callback), callback.identifier.name))
if returnType.nullable():
result = CGWrapper(result, pre="Option<", post=">")
return result
@@ -5134,7 +5135,7 @@ class CGDictionary(CGThing):
@staticmethod
def makeModuleName(dictionary):
- return dictionary.module()
+ return getModuleFromObject(dictionary)
def getMemberType(self, memberInfo):
member, info = memberInfo
@@ -6033,8 +6034,8 @@ class GlobalGenRoots():
def Bindings(config):
descriptors = (set(d.name + "Binding" for d in config.getDescriptors(register=True)) |
- set(d.module() for d in config.callbacks) |
- set(d.module() for d in config.getDictionaries()))
+ set(getModuleFromObject(d) for d in config.callbacks) |
+ set(getModuleFromObject(d) for d in config.getDictionaries()))
curr = CGList([CGGeneric("pub mod %s;\n" % name) for name in sorted(descriptors)])
curr = CGWrapper(curr, pre=AUTOGENERATED_WARNING_COMMENT)
return curr