mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +01:00
Use snake case for the argument to from_jsval for DOMString.
This commit is contained in:
parent
d026457fdd
commit
dac0190b6d
1 changed files with 4 additions and 2 deletions
|
@ -286,8 +286,10 @@ pub fn jsid_to_str(cx: *mut JSContext, id: jsid) -> DOMString {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl FromJSValConvertible<StringificationBehavior> for DOMString {
|
impl FromJSValConvertible<StringificationBehavior> for DOMString {
|
||||||
fn from_jsval(cx: *mut JSContext, value: JSVal, nullBehavior: StringificationBehavior) -> Result<DOMString, ()> {
|
fn from_jsval(cx: *mut JSContext, value: JSVal,
|
||||||
if nullBehavior == StringificationBehavior::Empty && value.is_null() {
|
null_behavior: StringificationBehavior)
|
||||||
|
-> Result<DOMString, ()> {
|
||||||
|
if null_behavior == StringificationBehavior::Empty && value.is_null() {
|
||||||
Ok("".to_owned())
|
Ok("".to_owned())
|
||||||
} else {
|
} else {
|
||||||
let jsstr = unsafe { JS_ValueToString(cx, value) };
|
let jsstr = unsafe { JS_ValueToString(cx, value) };
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue