mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +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
|
@ -48,7 +48,7 @@ use crate::dom::node::{window_from_node, Node};
|
|||
use crate::dom::virtualmethods::VirtualMethods;
|
||||
use crate::dom::webgl2renderingcontext::WebGL2RenderingContext;
|
||||
use crate::dom::webglrenderingcontext::WebGLRenderingContext;
|
||||
use crate::script_runtime::JSContext;
|
||||
use crate::script_runtime::{CanGc, JSContext};
|
||||
|
||||
const DEFAULT_WIDTH: u32 = 300;
|
||||
const DEFAULT_HEIGHT: u32 = 150;
|
||||
|
@ -424,9 +424,13 @@ impl HTMLCanvasElementMethods for HTMLCanvasElement {
|
|||
}
|
||||
|
||||
/// <https://w3c.github.io/mediacapture-fromelement/#dom-htmlcanvaselement-capturestream>
|
||||
fn CaptureStream(&self, _frame_request_rate: Option<Finite<f64>>) -> DomRoot<MediaStream> {
|
||||
fn CaptureStream(
|
||||
&self,
|
||||
_frame_request_rate: Option<Finite<f64>>,
|
||||
can_gc: CanGc,
|
||||
) -> DomRoot<MediaStream> {
|
||||
let global = self.global();
|
||||
let stream = MediaStream::new(&global);
|
||||
let stream = MediaStream::new(&global, can_gc);
|
||||
let track = MediaStreamTrack::new(&global, MediaStreamId::new(), MediaStreamType::Video);
|
||||
stream.AddTrack(&track);
|
||||
stream
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue