mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
script: Mark callback methods with CanGc. (#35753)
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
This commit is contained in:
parent
3d320fa96a
commit
5650fa2e79
26 changed files with 133 additions and 67 deletions
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue