diff options
Diffstat (limited to 'src/components/script/dom/bindings/error.rs')
-rw-r--r-- | src/components/script/dom/bindings/error.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/components/script/dom/bindings/error.rs b/src/components/script/dom/bindings/error.rs index 7b021bbae2d..f204dc5859a 100644 --- a/src/components/script/dom/bindings/error.rs +++ b/src/components/script/dom/bindings/error.rs @@ -3,9 +3,8 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ use dom::bindings::conversions::ToJSValConvertible; -use dom::bindings::js::JSRef; +use dom::bindings::global::GlobalRef; use dom::domexception::DOMException; -use dom::window::Window; use js::jsapi::{JSContext, JSBool}; use js::jsapi::{JS_IsExceptionPending, JS_SetPendingException}; @@ -37,7 +36,7 @@ pub type Fallible<T> = Result<T, Error>; pub type ErrorResult = Fallible<()>; -pub fn throw_dom_exception(cx: *mut JSContext, global: &JSRef<Window>, +pub fn throw_dom_exception(cx: *mut JSContext, global: &GlobalRef, result: Error) { assert!(unsafe { JS_IsExceptionPending(cx) } == 0); let exception = DOMException::new_from_error(global, result).root(); |