diff options
author | Manish Goregaokar <manishsmail@gmail.com> | 2019-07-08 14:30:51 -0700 |
---|---|---|
committer | Manish Goregaokar <manishsmail@gmail.com> | 2019-07-11 11:12:59 -0700 |
commit | 57c85361be90634343a6fe66bfe993ac8081b9ca (patch) | |
tree | c717a482616e4c4ed5f8864e6f51cfda9009fbc8 /components/script/dom/xr.rs | |
parent | 8780edb16563ac7d519091023a9ecf894c21fd0f (diff) | |
download | servo-57c85361be90634343a6fe66bfe993ac8081b9ca.tar.gz servo-57c85361be90634343a6fe66bfe993ac8081b9ca.zip |
Clean up vrdisplay, set active immersive session correctly
Diffstat (limited to 'components/script/dom/xr.rs')
-rw-r--r-- | components/script/dom/xr.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/components/script/dom/xr.rs b/components/script/dom/xr.rs index c20dd8fdafc..db2fd105a33 100644 --- a/components/script/dom/xr.rs +++ b/components/script/dom/xr.rs @@ -40,7 +40,7 @@ pub struct XR { displays: DomRefCell<Vec<Dom<VRDisplay>>>, gamepads: DomRefCell<Vec<Dom<Gamepad>>>, pending_immersive_session: Cell<bool>, - active_immersive_session: MutNullableDom<VRDisplay>, + active_immersive_session: MutNullableDom<XRSession>, test: MutNullableDom<XRTest>, } @@ -70,7 +70,7 @@ impl XR { self.pending_immersive_session.set(true) } - pub fn set_active_immersive_session(&self, session: &VRDisplay) { + pub fn set_active_immersive_session(&self, session: &XRSession) { // XXXManishearth when we support non-immersive (inline) sessions we should // ensure they never reach these codepaths self.pending_immersive_session.set(false); @@ -237,6 +237,7 @@ impl XR { }; let session = XRSession::new(&self.global(), session); + self.set_active_immersive_session(&session); promise.resolve_native(&session); } |