diff options
Diffstat (limited to 'components/servo/lib.rs')
-rw-r--r-- | components/servo/lib.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/components/servo/lib.rs b/components/servo/lib.rs index 545d3645306..9ef5013a7b2 100644 --- a/components/servo/lib.rs +++ b/components/servo/lib.rs @@ -287,7 +287,8 @@ where // For the moment, we enable use both the webxr crate and the rust-webvr crate, // but we are migrating over to just using webxr. - let mut webxr_registry = webxr_api::Registry::new(); + let mut webxr_registry = + webxr_api::Registry::new().expect("Failed to create WebXR device registry"); if pref!(dom.webvr.enabled) || pref!(dom.webxr.enabled) { embedder.register_webxr(&mut webxr_registry); } @@ -319,6 +320,7 @@ where webrender_api_sender, window.gl(), webvr_services, + webxr_registry, ); // Send the constellation's swmanager sender to service worker manager thread @@ -628,6 +630,7 @@ fn create_constellation( webrender_api_sender: webrender_api::RenderApiSender, window_gl: Rc<dyn gl::Gl>, webvr_services: Option<VRServiceManager>, + webxr_registry: webxr_api::Registry, ) -> (Sender<ConstellationMsg>, SWManagerSenders) { // Global configuration options, parsed from the command line. let opts = opts::get(); @@ -708,6 +711,7 @@ fn create_constellation( webrender_api_sender, webgl_threads, webvr_chan, + webxr_registry, }; let (constellation_chan, from_swmanager_sender) = Constellation::< script_layout_interface::message::Msg, |