mirror of
https://github.com/servo/servo.git
synced 2025-06-15 11:54:28 +00:00
auto merge of #1821 : Ms2ger/servo/result-JSValConvertible, r=jdm
This commit is contained in:
commit
cfbcb5c62b
2 changed files with 22 additions and 22 deletions
|
@ -1239,8 +1239,8 @@ for (uint32_t i = 0; i < length; ++i) {
|
|||
#XXXjdm support conversionBehavior here
|
||||
template = (
|
||||
"match JSValConvertible::from_jsval(cx, ${val}) {\n"
|
||||
" Some(v) => ${declName} = %s,\n"
|
||||
" None => %s\n"
|
||||
" Ok(v) => ${declName} = %s,\n"
|
||||
" Err(_) => %s\n"
|
||||
"}" % (successVal, failureCode))
|
||||
|
||||
if defaultValue is not None and isinstance(defaultValue, IDLNullValue):
|
||||
|
@ -1262,8 +1262,8 @@ for (uint32_t i = 0; i < length; ++i) {
|
|||
successVal = preSuccess + successVal + postSuccess
|
||||
template = (
|
||||
"match JSValConvertible::from_jsval(cx, ${val}) {\n"
|
||||
" None => %s,\n"
|
||||
" Some(v) => %s = %s\n"
|
||||
" Err(_) => %s,\n"
|
||||
" Ok(v) => %s = %s\n"
|
||||
"}" % (failureCode, dataLoc, successVal))
|
||||
declType = CGGeneric(typeName)
|
||||
if (defaultValue is not None and
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue