mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Removed unused object_to_string method
This commit is contained in:
parent
530d4547c9
commit
68f6fdd8bc
1 changed files with 2 additions and 16 deletions
|
@ -8,8 +8,8 @@
|
||||||
|
|
||||||
use dom::bindings::conversions::is_dom_proxy;
|
use dom::bindings::conversions::is_dom_proxy;
|
||||||
use dom::bindings::utils::delete_property_by_id;
|
use dom::bindings::utils::delete_property_by_id;
|
||||||
use js::jsapi::{JSContext, JSPropertyDescriptor, JSObject, JSString};
|
use js::jsapi::{JSContext, JSPropertyDescriptor, JSObject};
|
||||||
use js::jsapi::{JS_GetPropertyDescriptorById, JS_NewStringCopyN};
|
use js::jsapi::{JS_GetPropertyDescriptorById};
|
||||||
use js::jsapi::{JS_DefinePropertyById6, JS_NewObjectWithGivenProto};
|
use js::jsapi::{JS_DefinePropertyById6, JS_NewObjectWithGivenProto};
|
||||||
use js::jsapi::{JS_StrictPropertyStub, JSErrNum};
|
use js::jsapi::{JS_StrictPropertyStub, JSErrNum};
|
||||||
use js::jsapi::{Handle, HandleObject, HandleId, MutableHandle, RootedObject, ObjectOpResult};
|
use js::jsapi::{Handle, HandleObject, HandleId, MutableHandle, RootedObject, ObjectOpResult};
|
||||||
|
@ -107,20 +107,6 @@ pub unsafe extern fn is_extensible(_cx: *mut JSContext, _proxy: HandleObject,
|
||||||
return JSTrue;
|
return JSTrue;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns the stringification of an object with class `name`.
|
|
||||||
pub fn object_to_string(cx: *mut JSContext, name: &str) -> *mut JSString {
|
|
||||||
unsafe {
|
|
||||||
let result = format!("[object {}]", name);
|
|
||||||
|
|
||||||
let chars = result.as_ptr() as *const libc::c_char;
|
|
||||||
let length = result.len() as libc::size_t;
|
|
||||||
|
|
||||||
let string = JS_NewStringCopyN(cx, chars, length);
|
|
||||||
assert!(!string.is_null());
|
|
||||||
return string;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Get the expando object, or null if there is none.
|
/// Get the expando object, or null if there is none.
|
||||||
pub fn get_expando_object(obj: HandleObject) -> *mut JSObject {
|
pub fn get_expando_object(obj: HandleObject) -> *mut JSObject {
|
||||||
unsafe {
|
unsafe {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue