aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings/error.rs
diff options
context:
space:
mode:
authorMs2ger <Ms2ger@gmail.com>2016-08-26 17:58:46 +0200
committerMs2ger <Ms2ger@gmail.com>2016-08-26 17:59:31 +0200
commit5662f0d34646c1e2940216b0a3317fd62a54aeb7 (patch)
treeb156f6a1d0ef1600e219c0327c7144486458cf51 /components/script/dom/bindings/error.rs
parent3b11c5ea2d3d6e68d4f9609e5e2a81056bfb27d0 (diff)
downloadservo-5662f0d34646c1e2940216b0a3317fd62a54aeb7.tar.gz
servo-5662f0d34646c1e2940216b0a3317fd62a54aeb7.zip
Remove the JSAutoCompartment from report_pending_exception.
It doesn't really belong there.
Diffstat (limited to 'components/script/dom/bindings/error.rs')
-rw-r--r--components/script/dom/bindings/error.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/components/script/dom/bindings/error.rs b/components/script/dom/bindings/error.rs
index ceb7cdd05b3..6c26ae8502c 100644
--- a/components/script/dom/bindings/error.rs
+++ b/components/script/dom/bindings/error.rs
@@ -13,9 +13,7 @@ use dom::bindings::str::USVString;
use dom::domexception::{DOMErrorName, DOMException};
use js::error::{throw_range_error, throw_type_error};
use js::jsapi::HandleObject;
-use js::jsapi::JSAutoCompartment;
use js::jsapi::JSContext;
-use js::jsapi::JSObject;
use js::jsapi::JS_ClearPendingException;
use js::jsapi::JS_ErrorFromException;
use js::jsapi::JS_GetPendingException;
@@ -194,9 +192,8 @@ impl ErrorInfo {
}
/// Report a pending exception, thereby clearing it.
-pub unsafe fn report_pending_exception(cx: *mut JSContext, obj: *mut JSObject) {
+pub unsafe fn report_pending_exception(cx: *mut JSContext) {
if JS_IsExceptionPending(cx) {
- let _ac = JSAutoCompartment::new(cx, obj);
rooted!(in(cx) let mut value = UndefinedValue());
if !JS_GetPendingException(cx, value.handle_mut()) {
JS_ClearPendingException(cx);