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

@ -3200,8 +3200,16 @@ impl ScriptThread {
}
fn perform_a_microtask_checkpoint(&self) {
let globals = self.documents.borrow()
.iter()
.map(|(_id, document)| document.global())
.collect();
self.microtask_queue
.checkpoint(|id| self.documents.borrow().find_global(id))
.checkpoint(
|id| self.documents.borrow().find_global(id),
globals
)
}
}