Make CanGc derive Copy and Clone (#33407)

Signed-off-by: Taym <haddadi.taym@gmail.com>
This commit is contained in:
Taym Haddadi 2024-09-12 12:24:44 +02:00 committed by GitHub
parent 637770600f
commit 747e562ff0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 61 additions and 72 deletions

View file

@ -1352,7 +1352,7 @@ impl HTMLMediaElement {
}
}
fn setup_media_player(&self, resource: &Resource, _can_gc: CanGc) -> Result<(), ()> {
fn setup_media_player(&self, resource: &Resource, can_gc: CanGc) -> Result<(), ()> {
let stream_type = match *resource {
Resource::Object => {
if let Some(ref src_object) = *self.src_object.borrow() {
@ -1403,7 +1403,7 @@ impl HTMLMediaElement {
let this = trusted_node.clone();
if let Err(err) = task_source.queue_with_canceller(
task!(handle_player_event: move || {
this.root().handle_player_event(&event, CanGc::note());
this.root().handle_player_event(&event, can_gc);
}),
&canceller,
) {