aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbors-servo <release+servo@mozilla.com>2014-03-07 15:19:29 -0500
committerbors-servo <release+servo@mozilla.com>2014-03-07 15:19:29 -0500
commit636ae6e7620f3699532b7103cac024a498613660 (patch)
tree1f6dfdea2efdd4f372cffb58c0a96e62651c1078
parent3a31372217516572a101ac707c70e8ec984bda72 (diff)
parent9003d212b0b046d54e63674cf4f713581cb6d67d (diff)
downloadservo-636ae6e7620f3699532b7103cac024a498613660.tar.gz
servo-636ae6e7620f3699532b7103cac024a498613660.zip
auto merge of #1856 : Ms2ger/servo/argIsPointer, r=jdm
-rw-r--r--src/components/script/dom/bindings/codegen/CodegenRust.py11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/components/script/dom/bindings/codegen/CodegenRust.py b/src/components/script/dom/bindings/codegen/CodegenRust.py
index 02f50f83421..47c91614d52 100644
--- a/src/components/script/dom/bindings/codegen/CodegenRust.py
+++ b/src/components/script/dom/bindings/codegen/CodegenRust.py
@@ -907,11 +907,6 @@ for (uint32_t i = 0; i < length; ++i) {
failureCode)
return (template, declType, None, isOptional, None)
- # This is an interface that we implement as a concrete class
- # or an XPCOM interface.
-
- argIsPointer = type.nullable()
-
# Sequences and callbacks have to hold a strong ref to the thing being
# passed down.
forceOwningType = descriptor.interface.isCallback() or isMember
@@ -930,14 +925,14 @@ for (uint32_t i = 0; i < length; ++i) {
"JSVAL_TO_OBJECT(${val})",
"${declName}",
failureCode,
- isOptional or argIsPointer or type.nullable(),
+ isOptional or type.nullable(),
preUnwrapped=preSuccess, postUnwrapped=postSuccess))
else:
templateBody += str(FailureFatalCastableObjectUnwrapper(
descriptor,
"JSVAL_TO_OBJECT(${val})",
"${declName}",
- isOptional or argIsPointer or type.nullable()))
+ isOptional or type.nullable()))
else:
templateBody += (
"match unwrap_value::<" + typePtr + ">(&${val} as *JSVal, "
@@ -955,7 +950,7 @@ for (uint32_t i = 0; i < length; ++i) {
failureCode)
declType = CGGeneric(typePtr)
- if argIsPointer or isOptional:
+ if type.nullable() or isOptional:
declType = CGWrapper(declType, pre="Option<", post=">")
return (templateBody, declType, None, isOptional, "None" if isOptional else None)