refactor: propagate CanGc arguments through callers (#35565)

Signed-off-by: Auguste Baum <auguste.apple@gmail.com>
This commit is contained in:
Auguste Baum 2025-02-21 18:35:17 +01:00 committed by GitHub
parent 085cd981aa
commit ca1f0486ba
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 62 additions and 42 deletions

View file

@ -23,8 +23,12 @@ pub(crate) struct RTCRtpTransceiver {
}
impl RTCRtpTransceiver {
fn new_inherited(global: &GlobalScope, direction: RTCRtpTransceiverDirection) -> Self {
let sender = RTCRtpSender::new(global, CanGc::note());
fn new_inherited(
global: &GlobalScope,
direction: RTCRtpTransceiverDirection,
can_gc: CanGc,
) -> Self {
let sender = RTCRtpSender::new(global, can_gc);
Self {
reflector_: Reflector::new(),
direction: Cell::new(direction),
@ -38,7 +42,7 @@ impl RTCRtpTransceiver {
can_gc: CanGc,
) -> DomRoot<Self> {
reflect_dom_object(
Box::new(Self::new_inherited(global, direction)),
Box::new(Self::new_inherited(global, direction, can_gc)),
global,
can_gc,
)