aboutsummaryrefslogtreecommitdiffstats
path: root/components/script
diff options
context:
space:
mode:
authorCYBAI <cyb.ai.815@gmail.com>2018-06-24 18:32:17 +0800
committerCYBAI <cyb.ai.815@gmail.com>2018-10-18 19:13:24 +0800
commitf952d7ce0a1fcae485fa6728b9c3237f7e5f9e66 (patch)
treec355b2733e66bdaf231a3d43428a9511938f63e0 /components/script
parent9039a5cc713e82824e86757dcf934f01b5c2ae2e (diff)
downloadservo-f952d7ce0a1fcae485fa6728b9c3237f7e5f9e66.tar.gz
servo-f952d7ce0a1fcae485fa6728b9c3237f7e5f9e66.zip
Clear consumed rejections and add FIXME comments
Diffstat (limited to 'components/script')
-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();
+ }
}
}