mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +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
|
@ -83,8 +83,9 @@ impl XRSessionMethods for XRSession {
|
|||
}
|
||||
|
||||
/// https://immersive-web.github.io/webxr/#dom-xrsession-requestanimationframe
|
||||
#[allow(unsafe_code)]
|
||||
fn UpdateRenderState(&self, init: &XRRenderStateInit) -> Rc<Promise> {
|
||||
let p = Promise::new(&self.global());
|
||||
let p = unsafe { Promise::new_in_current_compartment(&self.global()) };
|
||||
self.display.queue_renderstate(init, p.clone());
|
||||
p
|
||||
}
|
||||
|
@ -105,8 +106,9 @@ impl XRSessionMethods for XRSession {
|
|||
}
|
||||
|
||||
/// https://immersive-web.github.io/webxr/#dom-xrsession-requestreferencespace
|
||||
#[allow(unsafe_code)]
|
||||
fn RequestReferenceSpace(&self, options: &XRReferenceSpaceOptions) -> Rc<Promise> {
|
||||
let p = Promise::new(&self.global());
|
||||
let p = unsafe { Promise::new_in_current_compartment(&self.global()) };
|
||||
|
||||
// https://immersive-web.github.io/webxr/#create-a-reference-space
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue