require entered realm, use aes, to append native promise handler

This commit is contained in:
Gregory Terzian 2020-05-16 14:57:47 +08:00
parent bd5796c90b
commit 48d4aec5b6
4 changed files with 29 additions and 26 deletions

View file

@ -1003,8 +1003,8 @@ impl TestBindingMethods for TestBinding {
resolve.map(SimpleHandler::new),
reject.map(SimpleHandler::new),
);
let p = Promise::new_in_current_realm(&global, comp);
p.append_native_handler(&handler);
let p = Promise::new_in_current_realm(&global, comp.clone());
p.append_native_handler(&handler, comp);
return p;
#[derive(JSTraceable, MallocSizeOf)]