Multiple CanGc fixes in components/script/dom (#33924)

Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
This commit is contained in:
tanishka 2024-10-20 21:37:15 +05:30 committed by GitHub
parent ee9e1fbbd6
commit 65c866285f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
26 changed files with 77 additions and 37 deletions

View file

@ -168,6 +168,7 @@ impl Event {
&self,
target: &EventTarget,
legacy_target_override: bool,
can_gc: CanGc,
// TODO legacy_did_output_listeners_throw_flag for indexeddb
) -> EventStatus {
// Step 1.
@ -333,7 +334,7 @@ impl Event {
if self.DefaultPrevented() {
activation_target.legacy_canceled_activation_behavior(pre_activation_result);
} else {
activation_target.activation_behavior(self, target);
activation_target.activation_behavior(self, target, can_gc);
}
}
@ -380,7 +381,7 @@ impl Event {
/// <https://html.spec.whatwg.org/multipage/#fire-a-simple-event>
pub fn fire(&self, target: &EventTarget) -> EventStatus {
self.set_trusted(true);
target.dispatch_event(self)
target.dispatch_event(self, CanGc::note())
}
}