aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings/conversions.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/bindings/conversions.rs')
-rw-r--r--components/script/dom/bindings/conversions.rs17
1 files changed, 4 insertions, 13 deletions
diff --git a/components/script/dom/bindings/conversions.rs b/components/script/dom/bindings/conversions.rs
index 82a3b8555f4..35a2dd1fc47 100644
--- a/components/script/dom/bindings/conversions.rs
+++ b/components/script/dom/bindings/conversions.rs
@@ -40,11 +40,11 @@ pub(crate) use js::conversions::{
use js::error::throw_type_error;
use js::glue::{GetProxyReservedSlot, IsWrapper, JS_GetReservedSlot, UnwrapObjectDynamic};
use js::jsapi::{Heap, IsWindowProxy, JSContext, JSObject, JS_IsExceptionPending};
-use js::jsval::{ObjectValue, UndefinedValue};
+use js::jsval::UndefinedValue;
use js::rust::wrappers::{IsArrayObject, JS_GetProperty, JS_HasProperty};
use js::rust::{
- get_object_class, is_dom_class, is_dom_object, maybe_wrap_value, HandleId, HandleObject,
- HandleValue, MutableHandleValue,
+ get_object_class, is_dom_class, is_dom_object, HandleId, HandleObject, HandleValue,
+ MutableHandleValue,
};
use num_traits::Float;
pub(crate) use script_bindings::conversions::*;
@@ -52,7 +52,7 @@ pub(crate) use script_bindings::conversions::*;
use crate::dom::bindings::error::{Error, Fallible};
use crate::dom::bindings::inheritance::Castable;
use crate::dom::bindings::num::Finite;
-use crate::dom::bindings::reflector::{DomObject, Reflector};
+use crate::dom::bindings::reflector::DomObject;
use crate::dom::bindings::root::DomRoot;
use crate::dom::bindings::str::DOMString;
use crate::dom::bindings::trace::{JSTraceable, RootedTraceableBox};
@@ -169,15 +169,6 @@ pub(crate) unsafe fn jsid_to_string(cx: *mut JSContext, id: HandleId) -> Option<
None
}
-impl ToJSValConvertible for Reflector {
- unsafe fn to_jsval(&self, cx: *mut JSContext, mut rval: MutableHandleValue) {
- let obj = self.get_jsobject().get();
- assert!(!obj.is_null());
- rval.set(ObjectValue(obj));
- maybe_wrap_value(cx, rval);
- }
-}
-
/// Returns whether `obj` is a DOM object implemented as a proxy.
pub(crate) fn is_dom_proxy(obj: *mut JSObject) -> bool {
use js::glue::IsProxyHandlerFamily;