script: Mark callback methods with CanGc. (#35753)

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
This commit is contained in:
Josh Matthews 2025-03-03 07:17:25 -05:00 committed by GitHub
parent 3d320fa96a
commit 5650fa2e79
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
26 changed files with 133 additions and 67 deletions

View file

@ -1154,6 +1154,7 @@ fn invoke(
phase,
invocation_target_in_shadow_tree,
timeline_window,
can_gc,
);
// Step 9. If found is false and events isTrusted attribute is true:
@ -1182,6 +1183,7 @@ fn invoke(
phase,
invocation_target_in_shadow_tree,
timeline_window,
can_gc,
);
// Step 9.4 Set events type attribute value to originalEventType.
@ -1196,6 +1198,7 @@ fn inner_invoke(
_phase: ListenerPhase,
invocation_target_in_shadow_tree: bool,
timeline_window: Option<&Window>,
can_gc: CanGc,
) -> bool {
// Step 1. Let found be false.
let mut found = false;
@ -1261,6 +1264,7 @@ fn inner_invoke(
.expect("event target was initialized as part of \"invoke\""),
event,
ExceptionHandling::Report,
can_gc,
);
if let Some(window) = timeline_window {
window.emit_timeline_marker(marker.end());