mirror of
https://github.com/servo/servo.git
synced 2025-08-07 22:45:34 +01:00
Make Promise::reject_error sound
This commit is contained in:
parent
15acd1525e
commit
af2e83f378
19 changed files with 110 additions and 94 deletions
|
@ -29,7 +29,6 @@ use dom::bindings::js::Root;
|
|||
use dom::bindings::reflector::{DomObject, Reflector};
|
||||
use dom::bindings::trace::trace_reflector;
|
||||
use dom::promise::Promise;
|
||||
use js::jsapi::JSAutoCompartment;
|
||||
use js::jsapi::JSTracer;
|
||||
use libc;
|
||||
use std::cell::RefCell;
|
||||
|
@ -126,10 +125,7 @@ impl TrustedPromise {
|
|||
let this = self;
|
||||
task!(reject_promise: move || {
|
||||
debug!("Rejecting promise.");
|
||||
let this = this.root();
|
||||
let cx = this.global().get_cx();
|
||||
let _ac = JSAutoCompartment::new(cx, this.reflector().get_jsobject().get());
|
||||
this.reject_error(cx, error);
|
||||
this.root().reject_error(error);
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue