aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--components/script/script_runtime.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/components/script/script_runtime.rs b/components/script/script_runtime.rs
index b128e3e54b5..2ab4ef986f0 100644
--- a/components/script/script_runtime.rs
+++ b/components/script/script_runtime.rs
@@ -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();
+ }
}
}