Removed unused object_to_string method

This commit is contained in:
Adrián Arroyo Calle 2015-08-09 11:26:15 +02:00
parent 530d4547c9
commit 68f6fdd8bc

View file

@ -8,8 +8,8 @@
use dom::bindings::conversions::is_dom_proxy;
use dom::bindings::utils::delete_property_by_id;
use js::jsapi::{JSContext, JSPropertyDescriptor, JSObject, JSString};
use js::jsapi::{JS_GetPropertyDescriptorById, JS_NewStringCopyN};
use js::jsapi::{JSContext, JSPropertyDescriptor, JSObject};
use js::jsapi::{JS_GetPropertyDescriptorById};
use js::jsapi::{JS_DefinePropertyById6, JS_NewObjectWithGivenProto};
use js::jsapi::{JS_StrictPropertyStub, JSErrNum};
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;
}
/// 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.
pub fn get_expando_object(obj: HandleObject) -> *mut JSObject {
unsafe {