Stop re-rooting CallSetup::exception_compartment.

This commit is contained in:
Ms2ger 2016-05-17 14:57:16 +02:00
parent e4db7b6e9c
commit 5242342aff

View file

@ -195,8 +195,7 @@ impl Drop for CallSetup {
unsafe { JS_IsExceptionPending(self.cx) };
if need_to_deal_with_exception {
unsafe {
let old_global = RootedObject::new(self.cx, self.exception_compartment.ptr);
let _ac = JSAutoCompartment::new(self.cx, old_global.ptr);
let _ac = JSAutoCompartment::new(self.cx, self.exception_compartment.ptr);
JS_ReportPendingException(self.cx);
}
}