mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
CanGc fixes from EventTarget::fire_event (#33985)
Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
This commit is contained in:
parent
bb4932026c
commit
ea875f0a51
35 changed files with 155 additions and 115 deletions
|
@ -99,13 +99,13 @@ impl TextTrackList {
|
|||
// FIXME(#22314, dlrobertson) allow TextTracks to be
|
||||
// removed from the TextTrackList.
|
||||
#[allow(dead_code)]
|
||||
pub fn remove(&self, idx: usize) {
|
||||
pub fn remove(&self, idx: usize, can_gc: CanGc) {
|
||||
if let Some(track) = self.dom_tracks.borrow().get(idx) {
|
||||
track.remove_track_list();
|
||||
}
|
||||
self.dom_tracks.borrow_mut().remove(idx);
|
||||
self.upcast::<EventTarget>()
|
||||
.fire_event(atom!("removetrack"));
|
||||
.fire_event(atom!("removetrack"), can_gc);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue