mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Remove the JSAutoCompartment from report_pending_exception.
It doesn't really belong there.
This commit is contained in:
parent
3b11c5ea2d
commit
5662f0d346
5 changed files with 11 additions and 10 deletions
|
@ -8,6 +8,7 @@ use dom::bindings::error::{Error, Fallible, report_pending_exception};
|
|||
use dom::bindings::global::global_root_from_object;
|
||||
use dom::bindings::reflector::Reflectable;
|
||||
use js::jsapi::GetGlobalForObjectCrossCompartment;
|
||||
use js::jsapi::JSAutoCompartment;
|
||||
use js::jsapi::JS_GetProperty;
|
||||
use js::jsapi::{Heap, MutableHandleObject, RootedObject};
|
||||
use js::jsapi::{IsCallable, JSContext, JSObject, JS_WrapObject};
|
||||
|
@ -189,7 +190,8 @@ impl<'a> Drop for CallSetup<'a> {
|
|||
unsafe {
|
||||
JS_LeaveCompartment(self.cx, self.old_compartment);
|
||||
if self.handling == ExceptionHandling::Report {
|
||||
report_pending_exception(self.cx, *self.exception_compartment);
|
||||
let _ac = JSAutoCompartment::new(self.cx, *self.exception_compartment);
|
||||
report_pending_exception(self.cx);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue