aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings/utils.rs
diff options
context:
space:
mode:
authorMs2ger <ms2ger@gmail.com>2014-09-25 12:30:25 +0200
committerMs2ger <ms2ger@gmail.com>2014-09-25 22:35:38 +0200
commitc4d36b57219ce303630a555f853ff27029209552 (patch)
tree74e5d155f082a9adc11a60bed6914c9917fcd8c8 /components/script/dom/bindings/utils.rs
parent1d00b28df0cf95c08a834f9e7e75c5bb005af074 (diff)
downloadservo-c4d36b57219ce303630a555f853ff27029209552.tar.gz
servo-c4d36b57219ce303630a555f853ff27029209552.zip
Remove unused cx_for_dom_object function.
Diffstat (limited to 'components/script/dom/bindings/utils.rs')
-rw-r--r--components/script/dom/bindings/utils.rs17
1 files changed, 1 insertions, 16 deletions
diff --git a/components/script/dom/bindings/utils.rs b/components/script/dom/bindings/utils.rs
index 65025973f71..1a48cfc08d2 100644
--- a/components/script/dom/bindings/utils.rs
+++ b/components/script/dom/bindings/utils.rs
@@ -8,7 +8,7 @@ use dom::bindings::codegen::PrototypeList;
use dom::bindings::codegen::PrototypeList::MAX_PROTO_CHAIN_LENGTH;
use dom::bindings::conversions::IDLInterface;
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::trace::Untraceable;
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,
id: jsid, bp: &mut bool) -> bool {
let mut value = UndefinedValue();