mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Remove commented bits that aren't necessary.
This commit is contained in:
parent
9f05f70754
commit
4cdb4df70c
1 changed files with 1 additions and 13 deletions
|
@ -866,10 +866,6 @@ for (uint32_t i = 0; i < length; ++i) {
|
||||||
argumentTypeName = typeName + "Argument"
|
argumentTypeName = typeName + "Argument"
|
||||||
if nullable:
|
if nullable:
|
||||||
typeName = "Option<" + typeName + " >"
|
typeName = "Option<" + typeName + " >"
|
||||||
#if isOptional:
|
|
||||||
# nonConstDecl = "const_cast<Optional<" + typeName + " >& >(${declName})"
|
|
||||||
#else:
|
|
||||||
# nonConstDecl = "const_cast<" + typeName + "& >(${declName})"
|
|
||||||
nonConstDecl = "${declName}"
|
nonConstDecl = "${declName}"
|
||||||
|
|
||||||
def handleNull(templateBody, setToNullVar, extraConditionForNull=""):
|
def handleNull(templateBody, setToNullVar, extraConditionForNull=""):
|
||||||
|
@ -896,10 +892,6 @@ for (uint32_t i = 0; i < length; ++i) {
|
||||||
else:
|
else:
|
||||||
mutableDecl = nonConstDecl
|
mutableDecl = nonConstDecl
|
||||||
constructDecl = None
|
constructDecl = None
|
||||||
#if nullable:
|
|
||||||
#holderType = CGWrapper(holderType, pre="Option<", post=" >")
|
|
||||||
# constructHolder = CGGeneric("${holderName} = Some(None);")
|
|
||||||
#else:
|
|
||||||
holderInit = "${declName}"
|
holderInit = "${declName}"
|
||||||
if nullable:
|
if nullable:
|
||||||
holderInit += ".get_mut_ref()"
|
holderInit += ".get_mut_ref()"
|
||||||
|
@ -1275,7 +1267,7 @@ for (uint32_t i = 0; i < length; ++i) {
|
||||||
if failureCode is None:
|
if failureCode is None:
|
||||||
failureCode = 'return 0'
|
failureCode = 'return 0'
|
||||||
|
|
||||||
if type.nullable(): #or isOptional:
|
if type.nullable():
|
||||||
dataLoc = "${declName}.SetValue()"
|
dataLoc = "${declName}.SetValue()"
|
||||||
nullCondition = "(RUST_JSVAL_IS_NULL(${val}) != 0 || RUST_JSVAL_IS_VOID(${val}) != 0)"
|
nullCondition = "(RUST_JSVAL_IS_NULL(${val}) != 0 || RUST_JSVAL_IS_VOID(${val}) != 0)"
|
||||||
if defaultValue is not None and isinstance(defaultValue, IDLNullValue):
|
if defaultValue is not None and isinstance(defaultValue, IDLNullValue):
|
||||||
|
@ -3785,10 +3777,6 @@ def getUnionTypeTemplateVars(type, descriptorProvider):
|
||||||
tryNextCode = """{
|
tryNextCode = """{
|
||||||
return Ok(true);
|
return Ok(true);
|
||||||
}"""
|
}"""
|
||||||
if type.isGeckoInterface():
|
|
||||||
tryNextCode = ("""/*if (mUnion.mType != mUnion.eUninitialized) {
|
|
||||||
mUnion.Destroy%s();
|
|
||||||
}*/""" % name) + tryNextCode
|
|
||||||
(template, declType, holderType,
|
(template, declType, holderType,
|
||||||
dealWithOptional, initialValue) = getJSToNativeConversionTemplate(
|
dealWithOptional, initialValue) = getJSToNativeConversionTemplate(
|
||||||
type, descriptorProvider, failureCode=tryNextCode,
|
type, descriptorProvider, failureCode=tryNextCode,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue