diff options
Diffstat (limited to 'components/script/dom/domexception.rs')
-rw-r--r-- | components/script/dom/domexception.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/components/script/dom/domexception.rs b/components/script/dom/domexception.rs index 434a6acc957..19bebacf9ad 100644 --- a/components/script/dom/domexception.rs +++ b/components/script/dom/domexception.rs @@ -6,7 +6,7 @@ use dom::bindings::codegen::Bindings::DOMExceptionBinding; use dom::bindings::codegen::Bindings::DOMExceptionBinding::DOMExceptionConstants; use dom::bindings::codegen::Bindings::DOMExceptionBinding::DOMExceptionMethods; use dom::bindings::global::GlobalRef; -use dom::bindings::js::{JSRef, Temporary}; +use dom::bindings::js::Root; use dom::bindings::utils::{Reflector, reflect_dom_object}; use util::str::DOMString; @@ -54,12 +54,12 @@ impl DOMException { } } - pub fn new(global: GlobalRef, code: DOMErrorName) -> Temporary<DOMException> { + pub fn new(global: GlobalRef, code: DOMErrorName) -> Root<DOMException> { reflect_dom_object(box DOMException::new_inherited(code), global, DOMExceptionBinding::Wrap) } } -impl<'a> DOMExceptionMethods for JSRef<'a, DOMException> { +impl<'a> DOMExceptionMethods for &'a DOMException { // https://heycam.github.io/webidl/#dfn-DOMException fn Code(self) -> u16 { match self.code { |