mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Simplify string construction in InterfaceObjectToString.
This commit is contained in:
parent
a0b55b4c6c
commit
6cc8a4dfba
1 changed files with 2 additions and 2 deletions
|
@ -109,8 +109,8 @@ extern fn InterfaceObjectToString(cx: *JSContext, _argc: c_uint, vp: *mut JSVal)
|
|||
let v = *GetFunctionNativeReserved(callee, TOSTRING_NAME_RESERVED_SLOT);
|
||||
assert!(jsval::is_string(v));
|
||||
let name = jsstring_to_str(cx, jsval::to_string(v));
|
||||
let retval = Some(~"function " + name + "() {\n [native code]\n}");
|
||||
*vp = domstring_to_jsval(cx, retval);
|
||||
let retval = ~"function " + name + "() {\n [native code]\n}";
|
||||
*vp = str_to_jsval(cx, retval);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue