Implement unhandledrejection event

This commit is contained in:
CYBAI 2018-05-07 20:36:18 +08:00
parent 8b28921136
commit 924a78c6c6
12 changed files with 342 additions and 20 deletions

View file

@ -93,7 +93,7 @@ impl Promise {
}
#[allow(unsafe_code, unrooted_must_root)]
unsafe fn new_with_js_promise(obj: HandleObject, cx: *mut JSContext) -> Rc<Promise> {
pub unsafe fn new_with_js_promise(obj: HandleObject, cx: *mut JSContext) -> Rc<Promise> {
assert!(IsPromiseObject(obj));
let promise = Promise {
reflector: Reflector::new(),