diff options
author | chickenleaf <lashwinib@gmail.com> | 2024-10-16 08:20:28 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-16 02:50:28 +0000 |
commit | a2f81d69c1971f07c2af8633756953ddd70a1bb5 (patch) | |
tree | a0f3cc7e6939f3e588b14b49b483a2d31e0d1aa4 /components/script/dom/xrinputsourcearray.rs | |
parent | 5b8fbb023dfba890c7744e826a077776516131c6 (diff) | |
download | servo-a2f81d69c1971f07c2af8633756953ddd70a1bb5.tar.gz servo-a2f81d69c1971f07c2af8633756953ddd70a1bb5.zip |
CanGc fixes (#33852)
Signed-off-by: L Ashwin B <lashwinib@gmail.com>
Diffstat (limited to 'components/script/dom/xrinputsourcearray.rs')
-rw-r--r-- | components/script/dom/xrinputsourcearray.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/components/script/dom/xrinputsourcearray.rs b/components/script/dom/xrinputsourcearray.rs index e47ddefb24a..e47e686870d 100644 --- a/components/script/dom/xrinputsourcearray.rs +++ b/components/script/dom/xrinputsourcearray.rs @@ -60,13 +60,14 @@ impl XRInputSourceArray { session, &added, &[], + can_gc, ); // Release the refcell guard drop(input_sources); event.upcast::<Event>().fire(session.upcast()); } - pub fn remove_input_source(&self, session: &XRSession, id: InputId) { + pub fn remove_input_source(&self, session: &XRSession, id: InputId, can_gc: CanGc) { let mut input_sources = self.input_sources.borrow_mut(); let global = self.global(); let removed = if let Some(i) = input_sources.iter().find(|i| i.id() == id) { @@ -84,6 +85,7 @@ impl XRInputSourceArray { session, &[], &removed, + can_gc, ); input_sources.retain(|i| i.id() != id); // release the refcell guard @@ -123,6 +125,7 @@ impl XRInputSourceArray { session, &added, removed, + can_gc, ); // release the refcell guard drop(input_sources); |