mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Rename Promise::new to Promise::new_in_current_compartment
This commit is contained in:
parent
6fa1853bb1
commit
782b58587a
25 changed files with 93 additions and 51 deletions
|
@ -44,8 +44,9 @@ impl MediaDevices {
|
|||
|
||||
impl MediaDevicesMethods for MediaDevices {
|
||||
/// https://w3c.github.io/mediacapture-main/#dom-mediadevices-getusermedia
|
||||
#[allow(unsafe_code)]
|
||||
fn GetUserMedia(&self, constraints: &MediaStreamConstraints) -> Rc<Promise> {
|
||||
let p = Promise::new(&self.global());
|
||||
let p = unsafe { Promise::new_in_current_compartment(&self.global()) };
|
||||
let media = ServoMedia::get().unwrap();
|
||||
let mut tracks = vec![];
|
||||
if let Some(constraints) = convert_constraints(&constraints.audio) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue