mirror of
https://github.com/servo/servo.git
synced 2025-06-17 21:04:28 +00:00
Pass a JSContext to JSValConvertible::from_jsval.
This commit is contained in:
parent
478c9bfc57
commit
6bc2c79f92
2 changed files with 11 additions and 11 deletions
|
@ -1246,7 +1246,7 @@ for (uint32_t i = 0; i < length; ++i) {
|
|||
"if (%s) {\n"
|
||||
" ${declName} = None;\n"
|
||||
"} else {\n"
|
||||
" match JSValConvertible::from_jsval(${val}) {\n"
|
||||
" match JSValConvertible::from_jsval(cx, ${val}) {\n"
|
||||
" Some(val_) => ${declName} = Some(%s),\n"
|
||||
" None => %s\n"
|
||||
" }\n"
|
||||
|
@ -1261,7 +1261,7 @@ for (uint32_t i = 0; i < length; ++i) {
|
|||
if preSuccess or postSuccess:
|
||||
successVal = preSuccess + successVal + postSuccess
|
||||
template = (
|
||||
"match JSValConvertible::from_jsval(${val}) {\n"
|
||||
"match JSValConvertible::from_jsval(cx, ${val}) {\n"
|
||||
" None => %s,\n"
|
||||
" Some(v) => %s = %s\n"
|
||||
"}" % (failureCode, dataLoc, successVal))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue