diff --git a/components/script/dom/bindings/conversions.rs b/components/script/dom/bindings/conversions.rs index 1509276db31..0ddee79814b 100644 --- a/components/script/dom/bindings/conversions.rs +++ b/components/script/dom/bindings/conversions.rs @@ -94,6 +94,17 @@ impl> FromJSValConvertible for Finite } } +impl FromJSValConvertible for Root { + type Config = (); + + unsafe fn from_jsval(_cx: *mut JSContext, + value: HandleValue, + _config: Self::Config) + -> Result, ()> { + root_from_handlevalue(value) + } +} + /// Convert the given `jsid` to a `DOMString`. Fails if the `jsid` is not a /// string, or if the string does not contain valid UTF-16. pub fn jsid_to_str(cx: *mut JSContext, id: HandleId) -> DOMString {