mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
CanGc fixes starting from blob.rs, mediastream.rs, custom_event.rs (#33820)
Signed-off-by: L Ashwin B <lashwinib@gmail.com>
This commit is contained in:
parent
bd8006afc5
commit
a55f9a37ec
9 changed files with 58 additions and 28 deletions
|
@ -33,8 +33,8 @@ impl MediaStream {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn new(global: &GlobalScope) -> DomRoot<MediaStream> {
|
||||
Self::new_with_proto(global, None, CanGc::note())
|
||||
pub fn new(global: &GlobalScope, can_gc: CanGc) -> DomRoot<MediaStream> {
|
||||
Self::new_with_proto(global, None, can_gc)
|
||||
}
|
||||
|
||||
fn new_with_proto(
|
||||
|
@ -54,8 +54,9 @@ impl MediaStream {
|
|||
global: &GlobalScope,
|
||||
id: MediaStreamId,
|
||||
ty: MediaStreamType,
|
||||
can_gc: CanGc,
|
||||
) -> DomRoot<MediaStream> {
|
||||
let this = Self::new(global);
|
||||
let this = Self::new(global, can_gc);
|
||||
let track = MediaStreamTrack::new(global, id, ty);
|
||||
this.AddTrack(&track);
|
||||
this
|
||||
|
@ -160,8 +161,8 @@ impl MediaStreamMethods for MediaStream {
|
|||
}
|
||||
|
||||
/// <https://w3c.github.io/mediacapture-main/#dom-mediastream-clone>
|
||||
fn Clone(&self) -> DomRoot<MediaStream> {
|
||||
self.clone_with_proto(None, CanGc::note())
|
||||
fn Clone(&self, can_gc: CanGc) -> DomRoot<MediaStream> {
|
||||
self.clone_with_proto(None, can_gc)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue