aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings/utils.rs
diff options
context:
space:
mode:
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();