Remove unused cx_for_dom_object function.

This commit is contained in:
Ms2ger 2014-09-25 12:30:25 +02:00
parent 1d00b28df0
commit c4d36b5721
2 changed files with 2 additions and 17 deletions

View file

@ -4524,7 +4524,7 @@ class CGBindingRoot(CGThing):
'dom::bindings::js::{OptionalRootable, OptionalRootedRootable, ResultRootable}', 'dom::bindings::js::{OptionalRootable, OptionalRootedRootable, ResultRootable}',
'dom::bindings::js::{OptionalRootedReference, OptionalOptionalRootedRootable}', 'dom::bindings::js::{OptionalRootedReference, OptionalOptionalRootedRootable}',
'dom::bindings::utils::{CreateDOMGlobal, CreateInterfaceObjects2}', 'dom::bindings::utils::{CreateDOMGlobal, CreateInterfaceObjects2}',
'dom::bindings::utils::{ConstantSpec, cx_for_dom_object}', 'dom::bindings::utils::ConstantSpec',
'dom::bindings::utils::{dom_object_slot, DOM_OBJECT_SLOT, DOMClass}', 'dom::bindings::utils::{dom_object_slot, DOM_OBJECT_SLOT, DOMClass}',
'dom::bindings::utils::{DOMJSClass, JSCLASS_DOM_GLOBAL}', 'dom::bindings::utils::{DOMJSClass, JSCLASS_DOM_GLOBAL}',
'dom::bindings::utils::{FindEnumStringIndex, GetArrayIndexFromId}', 'dom::bindings::utils::{FindEnumStringIndex, GetArrayIndexFromId}',

View file

@ -8,7 +8,7 @@ use dom::bindings::codegen::PrototypeList;
use dom::bindings::codegen::PrototypeList::MAX_PROTO_CHAIN_LENGTH; use dom::bindings::codegen::PrototypeList::MAX_PROTO_CHAIN_LENGTH;
use dom::bindings::conversions::IDLInterface; use dom::bindings::conversions::IDLInterface;
use dom::bindings::error::throw_type_error; use dom::bindings::error::throw_type_error;
use dom::bindings::global::{GlobalRef, global_object_for_js_object}; use dom::bindings::global::GlobalRef;
use dom::bindings::js::{JS, Temporary, Root}; use dom::bindings::js::{JS, Temporary, Root};
use dom::bindings::trace::Untraceable; use dom::bindings::trace::Untraceable;
use dom::browsercontext; use dom::browsercontext;
@ -663,21 +663,6 @@ pub extern fn outerize_global(_cx: *mut JSContext, obj: JSHandleObject) -> *mut
} }
} }
/// Get the `JSContext` for the `JSRuntime` associated with the thread
/// this object is on.
#[allow(unrooted_must_root)]
fn cx_for_dom_reflector(obj: *mut JSObject) -> *mut JSContext {
let global = global_object_for_js_object(obj);
let global = global.root();
global.root_ref().get_cx()
}
/// Get the `JSContext` for the `JSRuntime` associated with the thread
/// this DOM object is on.
pub fn cx_for_dom_object<T: Reflectable>(obj: &T) -> *mut JSContext {
cx_for_dom_reflector(obj.reflector().get_jsobject())
}
pub unsafe fn delete_property_by_id(cx: *mut JSContext, object: *mut JSObject, pub unsafe fn delete_property_by_id(cx: *mut JSContext, object: *mut JSObject,
id: jsid, bp: &mut bool) -> bool { id: jsid, bp: &mut bool) -> bool {
let mut value = UndefinedValue(); let mut value = UndefinedValue();