CanGc fixes from EventTarget::fire_event (#33985)

Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
This commit is contained in:
tanishka 2024-10-24 04:18:19 +05:30 committed by GitHub
parent bb4932026c
commit ea875f0a51
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
35 changed files with 155 additions and 115 deletions

View file

@ -4400,7 +4400,7 @@ impl TaskOnce for ElementPerformFullscreenEnter {
if self.error || !element.fullscreen_element_ready_check() {
document
.upcast::<EventTarget>()
.fire_event(atom!("fullscreenerror"));
.fire_event(atom!("fullscreenerror"), CanGc::note());
promise.reject_error(Error::Type(String::from("fullscreen is not connected")));
return;
}
@ -4418,7 +4418,7 @@ impl TaskOnce for ElementPerformFullscreenEnter {
// Step 7.6
document
.upcast::<EventTarget>()
.fire_event(atom!("fullscreenchange"));
.fire_event(atom!("fullscreenchange"), CanGc::note());
// Step 7.7
promise.resolve_native(&());
@ -4459,7 +4459,7 @@ impl TaskOnce for ElementPerformFullscreenExit {
// Step 9.8
document
.upcast::<EventTarget>()
.fire_event(atom!("fullscreenchange"));
.fire_event(atom!("fullscreenchange"), CanGc::note());
// Step 9.10
self.promise.root().resolve_native(&());