aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings/codegen
diff options
context:
space:
mode:
authorIgor Matuszewski <Xanewok@gmail.com>2018-03-22 20:38:26 +0100
committerIgor Matuszewski <Xanewok@gmail.com>2018-03-23 19:25:19 +0100
commit20f21cb5f85c48e7106177db6aa41fa54365d6cc (patch)
tree47991fb8e9d1e67a78e553429bc9e77079b08c1f /components/script/dom/bindings/codegen
parentc1c74ed96c035922f11c97eea020a676a562fb55 (diff)
downloadservo-20f21cb5f85c48e7106177db6aa41fa54365d6cc.tar.gz
servo-20f21cb5f85c48e7106177db6aa41fa54365d6cc.zip
Adapt uniform[fv] and similar to accept typed array args
Diffstat (limited to 'components/script/dom/bindings/codegen')
-rw-r--r--components/script/dom/bindings/codegen/CodegenRust.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/components/script/dom/bindings/codegen/CodegenRust.py b/components/script/dom/bindings/codegen/CodegenRust.py
index 24054de8e95..6e0632fe97d 100644
--- a/components/script/dom/bindings/codegen/CodegenRust.py
+++ b/components/script/dom/bindings/codegen/CodegenRust.py
@@ -418,11 +418,15 @@ class CGMethodCall(CGThing):
template = info.template
declType = info.declType
+ argName = "arg%d" % distinguishingIndex
+
testCode = instantiateJSToNativeConversionTemplate(
template,
{"val": distinguishingArg},
declType,
- "arg%d" % distinguishingIndex)
+ argName)
+ if type_needs_auto_root(type):
+ testCode.append(CGGeneric("auto_root!(in(cx) let %s = %s);" % (argName, argName)))
# Indent by 4, since we need to indent further than our "do" statement
caseBody.append(CGIndenter(testCode, 4))