diff options
Diffstat (limited to 'components/script/dom/xrtest.rs')
-rw-r--r-- | components/script/dom/xrtest.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/components/script/dom/xrtest.rs b/components/script/dom/xrtest.rs index b50549d8be2..c6cc3a3ee7c 100644 --- a/components/script/dom/xrtest.rs +++ b/components/script/dom/xrtest.rs @@ -11,6 +11,7 @@ use std::rc::Rc; use dom_struct::dom_struct; use ipc_channel::ipc::IpcSender; use ipc_channel::router::ROUTER; +use js::jsval::JSVal; use profile_traits::ipc; use webxr_api::{self, Error as XRError, MockDeviceInit, MockDeviceMsg}; @@ -184,7 +185,8 @@ impl XRTestMethods for XRTest { /// <https://github.com/immersive-web/webxr-test-api/blob/master/explainer.md> fn SimulateUserActivation(&self, f: Rc<Function>) { ScriptThread::set_user_interacting(true); - let _ = f.Call__(vec![], ExceptionHandling::Rethrow); + rooted!(in(*GlobalScope::get_cx()) let mut value: JSVal); + let _ = f.Call__(vec![], value.handle_mut(), ExceptionHandling::Rethrow); ScriptThread::set_user_interacting(false); } |