mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +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 {
|
||||
fn from_jsval(cx: *mut JSContext, value: JSVal, nullBehavior: StringificationBehavior) -> Result<DOMString, ()> {
|
||||
if nullBehavior == StringificationBehavior::Empty && value.is_null() {
|
||||
fn from_jsval(cx: *mut JSContext, value: JSVal,
|
||||
null_behavior: StringificationBehavior)
|
||||
-> Result<DOMString, ()> {
|
||||
if null_behavior == StringificationBehavior::Empty && value.is_null() {
|
||||
Ok("".to_owned())
|
||||
} else {
|
||||
let jsstr = unsafe { JS_ValueToString(cx, value) };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue