Auto merge of #7107 - AdrianArroyoCalle:master, r=Ms2ger

Removed unused object_to_string method

Closes #7100

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7107)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2015-08-09 04:16:55 -06:00
commit 28abc55d9b

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 {