aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/script
diff options
context:
space:
mode:
authorJosh Matthews <josh@joshmatthews.net>2014-02-19 13:27:51 -0500
committerJosh Matthews <josh@joshmatthews.net>2014-02-24 15:56:38 -0500
commit4cdb4df70c60e198a87491d0325d487459d15ea4 (patch)
tree0e010160a3136debf495e0ad0a352eff4ef40356 /src/components/script
parent9f05f70754f45939c05223563b5a5e5254bc5f45 (diff)
downloadservo-4cdb4df70c60e198a87491d0325d487459d15ea4.tar.gz
servo-4cdb4df70c60e198a87491d0325d487459d15ea4.zip
Remove commented bits that aren't necessary.
Diffstat (limited to 'src/components/script')
-rw-r--r--src/components/script/dom/bindings/codegen/CodegenRust.py14
1 files changed, 1 insertions, 13 deletions
diff --git a/src/components/script/dom/bindings/codegen/CodegenRust.py b/src/components/script/dom/bindings/codegen/CodegenRust.py
index 330d414c84d..152c2bb7453 100644
--- a/src/components/script/dom/bindings/codegen/CodegenRust.py
+++ b/src/components/script/dom/bindings/codegen/CodegenRust.py
@@ -866,10 +866,6 @@ for (uint32_t i = 0; i < length; ++i) {
argumentTypeName = typeName + "Argument"
if nullable:
typeName = "Option<" + typeName + " >"
- #if isOptional:
- # nonConstDecl = "const_cast<Optional<" + typeName + " >& >(${declName})"
- #else:
- # nonConstDecl = "const_cast<" + typeName + "& >(${declName})"
nonConstDecl = "${declName}"
def handleNull(templateBody, setToNullVar, extraConditionForNull=""):
@@ -896,10 +892,6 @@ for (uint32_t i = 0; i < length; ++i) {
else:
mutableDecl = nonConstDecl
constructDecl = None
- #if nullable:
- #holderType = CGWrapper(holderType, pre="Option<", post=" >")
- # constructHolder = CGGeneric("${holderName} = Some(None);")
- #else:
holderInit = "${declName}"
if nullable:
holderInit += ".get_mut_ref()"
@@ -1275,7 +1267,7 @@ for (uint32_t i = 0; i < length; ++i) {
if failureCode is None:
failureCode = 'return 0'
- if type.nullable(): #or isOptional:
+ if type.nullable():
dataLoc = "${declName}.SetValue()"
nullCondition = "(RUST_JSVAL_IS_NULL(${val}) != 0 || RUST_JSVAL_IS_VOID(${val}) != 0)"
if defaultValue is not None and isinstance(defaultValue, IDLNullValue):
@@ -3785,10 +3777,6 @@ def getUnionTypeTemplateVars(type, descriptorProvider):
tryNextCode = """{
return Ok(true);
}"""
- if type.isGeckoInterface():
- tryNextCode = ("""/*if (mUnion.mType != mUnion.eUninitialized) {
- mUnion.Destroy%s();
-}*/""" % name) + tryNextCode
(template, declType, holderType,
dealWithOptional, initialValue) = getJSToNativeConversionTemplate(
type, descriptorProvider, failureCode=tryNextCode,