aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/webxr
diff options
context:
space:
mode:
authorJosh Matthews <josh@joshmatthews.net>2025-03-03 07:17:25 -0500
committerGitHub <noreply@github.com>2025-03-03 12:17:25 +0000
commit5650fa2e79e03b83667c204f4ea0cf5ce6722615 (patch)
tree8362e3db4f9543b7df47955b1f2cd6602128e3d9 /components/script/dom/webxr
parent3d320fa96ae2ca95a720c454c47ee7827864c5af (diff)
downloadservo-5650fa2e79e03b83667c204f4ea0cf5ce6722615.tar.gz
servo-5650fa2e79e03b83667c204f4ea0cf5ce6722615.zip
script: Mark callback methods with CanGc. (#35753)
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
Diffstat (limited to 'components/script/dom/webxr')
-rw-r--r--components/script/dom/webxr/xrsession.rs2
-rw-r--r--components/script/dom/webxr/xrtest.rs9
2 files changed, 8 insertions, 3 deletions
diff --git a/components/script/dom/webxr/xrsession.rs b/components/script/dom/webxr/xrsession.rs
index 8205bc63798..f5fd065619e 100644
--- a/components/script/dom/webxr/xrsession.rs
+++ b/components/script/dom/webxr/xrsession.rs
@@ -480,7 +480,7 @@ impl XRSession {
for i in 0..len {
let callback = self.current_raf_callback_list.borrow()[i].1.clone();
if let Some(callback) = callback {
- let _ = callback.Call__(time, &frame, ExceptionHandling::Report);
+ let _ = callback.Call__(time, &frame, ExceptionHandling::Report, can_gc);
}
}
self.outside_raf.set(true);
diff --git a/components/script/dom/webxr/xrtest.rs b/components/script/dom/webxr/xrtest.rs
index 4ababf97849..8d80c5df69e 100644
--- a/components/script/dom/webxr/xrtest.rs
+++ b/components/script/dom/webxr/xrtest.rs
@@ -180,10 +180,15 @@ impl XRTestMethods<crate::DomTypeHolder> for XRTest {
}
/// <https://github.com/immersive-web/webxr-test-api/blob/master/explainer.md>
- fn SimulateUserActivation(&self, f: Rc<Function>) {
+ fn SimulateUserActivation(&self, f: Rc<Function>, can_gc: CanGc) {
ScriptThread::set_user_interacting(true);
rooted!(in(*GlobalScope::get_cx()) let mut value: JSVal);
- let _ = f.Call__(vec![], value.handle_mut(), ExceptionHandling::Rethrow);
+ let _ = f.Call__(
+ vec![],
+ value.handle_mut(),
+ ExceptionHandling::Rethrow,
+ can_gc,
+ );
ScriptThread::set_user_interacting(false);
}