Add support for attributes to the inCompartments binding parameter

This commit is contained in:
Bastien Orivel 2019-05-25 14:43:44 +02:00
parent 7dbff6efb7
commit 0b29caa554
3 changed files with 13 additions and 7 deletions

View file

@ -1048,11 +1048,10 @@ impl TestBindingMethods for TestBinding {
}
}
fn PromiseAttribute(&self) -> Rc<Promise> {
let in_compartment_proof = AlreadyInCompartment::assert(&self.global());
fn PromiseAttribute(&self, comp: InCompartment) -> Rc<Promise> {
Promise::new_in_current_compartment(
&self.global(),
InCompartment::Already(&in_compartment_proof),
comp
)
}