mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
parent
5b8fbb023d
commit
a2f81d69c1
20 changed files with 92 additions and 63 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue