From 3327f00bce1b5b302b0dfe8453a35b186029f0f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Fri, 15 Jan 2016 13:40:02 +0100 Subject: [PATCH] script: Implement FromJSValConvertible for Root --- components/script/dom/bindings/conversions.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) 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 {