mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +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,10 +33,11 @@ impl MediaStreamAudioDestinationNode {
|
|||
pub fn new_inherited(
|
||||
context: &AudioContext,
|
||||
options: &AudioNodeOptions,
|
||||
can_gc: CanGc,
|
||||
) -> Fallible<MediaStreamAudioDestinationNode> {
|
||||
let media = ServoMedia::get().unwrap();
|
||||
let (socket, id) = media.create_stream_and_socket(MediaStreamType::Audio);
|
||||
let stream = MediaStream::new_single(&context.global(), id, MediaStreamType::Audio);
|
||||
let stream = MediaStream::new_single(&context.global(), id, MediaStreamType::Audio, can_gc);
|
||||
let node_options = options.unwrap_or(
|
||||
2,
|
||||
ChannelCountMode::Explicit,
|
||||
|
@ -59,8 +60,9 @@ impl MediaStreamAudioDestinationNode {
|
|||
window: &Window,
|
||||
context: &AudioContext,
|
||||
options: &AudioNodeOptions,
|
||||
can_gc: CanGc,
|
||||
) -> Fallible<DomRoot<MediaStreamAudioDestinationNode>> {
|
||||
Self::new_with_proto(window, None, context, options, CanGc::note())
|
||||
Self::new_with_proto(window, None, context, options, can_gc)
|
||||
}
|
||||
|
||||
#[allow(crown::unrooted_must_root)]
|
||||
|
@ -71,7 +73,7 @@ impl MediaStreamAudioDestinationNode {
|
|||
options: &AudioNodeOptions,
|
||||
can_gc: CanGc,
|
||||
) -> Fallible<DomRoot<MediaStreamAudioDestinationNode>> {
|
||||
let node = MediaStreamAudioDestinationNode::new_inherited(context, options)?;
|
||||
let node = MediaStreamAudioDestinationNode::new_inherited(context, options, can_gc)?;
|
||||
Ok(reflect_dom_object_with_proto(
|
||||
Box::new(node),
|
||||
window,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue