aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings/error.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/bindings/error.rs')
-rw-r--r--components/script/dom/bindings/error.rs10
1 files changed, 4 insertions, 6 deletions
diff --git a/components/script/dom/bindings/error.rs b/components/script/dom/bindings/error.rs
index a9ee93663e7..ed0b81c4d64 100644
--- a/components/script/dom/bindings/error.rs
+++ b/components/script/dom/bindings/error.rs
@@ -121,12 +121,10 @@ pub unsafe fn throw_dom_exception(cx: *mut JSContext, global: GlobalRef, result:
}
/// Report a pending exception, thereby clearing it.
-pub fn report_pending_exception(cx: *mut JSContext, obj: *mut JSObject) {
- unsafe {
- if JS_IsExceptionPending(cx) {
- let _ac = JSAutoCompartment::new(cx, obj);
- JS_ReportPendingException(cx);
- }
+pub unsafe fn report_pending_exception(cx: *mut JSContext, obj: *mut JSObject) {
+ if JS_IsExceptionPending(cx) {
+ let _ac = JSAutoCompartment::new(cx, obj);
+ JS_ReportPendingException(cx);
}
}