Clear consumed rejections and add FIXME comments

This commit is contained in:
CYBAI 2018-06-24 18:32:17 +08:00
parent 9039a5cc71
commit f952d7ce0a

View file

@ -256,6 +256,13 @@ pub fn notify_about_rejected_promises(global: &GlobalScope) {
global.upcast(),
).unwrap();
}
if global.get_consumed_rejections().borrow().len() > 0 {
// FIXME(cybai): Implement `rejectionhandled` event instead of clearing the whole
// consumed rejections
// https://html.spec.whatwg.org/multipage/#the-hostpromiserejectiontracker-implementation
global.get_consumed_rejections().borrow_mut().clear();
}
}
}