diff --git a/components/script/dom/window.rs b/components/script/dom/window.rs index 8ca1e324511..b978d819dea 100644 --- a/components/script/dom/window.rs +++ b/components/script/dom/window.rs @@ -266,6 +266,9 @@ pub struct Window { #[ignore_malloc_size_of = "channels are hard"] webvr_chan: Option>, + #[ignore_malloc_size_of = "defined in webxr"] + webxr_registry: webxr_api::Registry, + /// A map for storing the previous permission state read results. permission_state_invocation_results: DomRefCell>, @@ -436,6 +439,10 @@ impl Window { self.webvr_chan.clone() } + pub fn webxr_registry(&self) -> &webxr_api::Registry { + &self.webxr_registry + } + fn new_paint_worklet(&self) -> DomRoot { debug!("Creating new paint worklet."); Worklet::new(self, WorkletGlobalScopeType::Paint) @@ -2072,6 +2079,7 @@ impl Window { navigation_start_precise: u64, webgl_chan: Option, webvr_chan: Option>, + webxr_registry: webxr_api::Registry, microtask_queue: Rc, webrender_document: DocumentId, webrender_api_sender: RenderApiSender, @@ -2149,6 +2157,7 @@ impl Window { test_runner: Default::default(), webgl_chan, webvr_chan, + webxr_registry, permission_state_invocation_results: Default::default(), pending_layout_images: Default::default(), unminified_js_dir: Default::default(), diff --git a/components/script/script_thread.rs b/components/script/script_thread.rs index e6d91a1bc2e..38ca94953d3 100644 --- a/components/script/script_thread.rs +++ b/components/script/script_thread.rs @@ -2975,6 +2975,7 @@ impl ScriptThread { incomplete.navigation_start_precise, self.webgl_chan.as_ref().map(|chan| chan.channel()), self.webvr_chan.clone(), + self.webxr_registry.clone(), self.microtask_queue.clone(), self.webrender_document, self.webrender_api_sender.clone(),