mirror of
https://github.com/servo/servo.git
synced 2025-08-09 15:35:34 +01:00
Propagate CanGc
arguments through callers in constructors (#35541)
Signed-off-by: Auguste Baum <auguste.apple@gmail.com>
This commit is contained in:
parent
5465bfc2af
commit
863d2ce871
260 changed files with 986 additions and 603 deletions
|
@ -54,6 +54,7 @@ impl TextTrack {
|
|||
}
|
||||
}
|
||||
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub(crate) fn new(
|
||||
window: &Window,
|
||||
id: DOMString,
|
||||
|
@ -62,19 +63,20 @@ impl TextTrack {
|
|||
language: DOMString,
|
||||
mode: TextTrackMode,
|
||||
track_list: Option<&TextTrackList>,
|
||||
can_gc: CanGc,
|
||||
) -> DomRoot<TextTrack> {
|
||||
reflect_dom_object(
|
||||
Box::new(TextTrack::new_inherited(
|
||||
id, kind, label, language, mode, track_list,
|
||||
)),
|
||||
window,
|
||||
CanGc::note(),
|
||||
can_gc,
|
||||
)
|
||||
}
|
||||
|
||||
pub(crate) fn get_cues(&self) -> DomRoot<TextTrackCueList> {
|
||||
self.cue_list
|
||||
.or_init(|| TextTrackCueList::new(self.global().as_window(), &[]))
|
||||
.or_init(|| TextTrackCueList::new(self.global().as_window(), &[], CanGc::note()))
|
||||
}
|
||||
|
||||
pub(crate) fn id(&self) -> &str {
|
||||
|
@ -133,7 +135,11 @@ impl TextTrackMethods<crate::DomTypeHolder> for TextTrack {
|
|||
fn GetActiveCues(&self) -> Option<DomRoot<TextTrackCueList>> {
|
||||
// XXX implement active cues logic
|
||||
// https://github.com/servo/servo/issues/22314
|
||||
Some(TextTrackCueList::new(self.global().as_window(), &[]))
|
||||
Some(TextTrackCueList::new(
|
||||
self.global().as_window(),
|
||||
&[],
|
||||
CanGc::note(),
|
||||
))
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-texttrack-addcue
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue