mirror of
https://github.com/servo/servo.git
synced 2025-08-04 21:20:23 +01:00
Reindent _obj_toString.
This commit is contained in:
parent
ef3901fceb
commit
8b3d64f8e3
1 changed files with 8 additions and 8 deletions
|
@ -81,16 +81,16 @@ pub unsafe extern fn delete_(cx: *mut JSContext, proxy: *mut JSObject, id: jsid,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn _obj_toString(cx: *mut JSContext, name: &str) -> *mut JSString {
|
pub fn _obj_toString(cx: *mut JSContext, name: &str) -> *mut JSString {
|
||||||
unsafe {
|
unsafe {
|
||||||
let result = format!("[object {}]", name);
|
let result = format!("[object {}]", name);
|
||||||
|
|
||||||
let chars = result.as_ptr() as *const libc::c_char;
|
let chars = result.as_ptr() as *const libc::c_char;
|
||||||
let length = result.len() as libc::size_t;
|
let length = result.len() as libc::size_t;
|
||||||
|
|
||||||
let string = JS_NewStringCopyN(cx, chars, length);
|
let string = JS_NewStringCopyN(cx, chars, length);
|
||||||
assert!(string.is_not_null());
|
assert!(string.is_not_null());
|
||||||
return string;
|
return string;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn GetExpandoObject(obj: *mut JSObject) -> *mut JSObject {
|
pub fn GetExpandoObject(obj: *mut JSObject) -> *mut JSObject {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue