mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Multiple CanGc fixes in components/script/dom (#33924)
Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
This commit is contained in:
parent
ee9e1fbbd6
commit
65c866285f
26 changed files with 77 additions and 37 deletions
|
@ -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())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue