mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
CanGc fixes in several files (#33958)
* few cangc fixes Signed-off-by: L Ashwin B <lashwinib@gmail.com> * few cangc fixes Signed-off-by: L Ashwin B <lashwinib@gmail.com> --------- Signed-off-by: L Ashwin B <lashwinib@gmail.com>
This commit is contained in:
parent
1bf68567b8
commit
ebfea9b352
22 changed files with 170 additions and 129 deletions
|
@ -216,7 +216,7 @@ impl Gamepad {
|
|||
self.gamepad_id
|
||||
}
|
||||
|
||||
pub fn update_connected(&self, connected: bool, has_gesture: bool) {
|
||||
pub fn update_connected(&self, connected: bool, has_gesture: bool, can_gc: CanGc) {
|
||||
if self.connected.get() == connected {
|
||||
return;
|
||||
}
|
||||
|
@ -229,7 +229,7 @@ impl Gamepad {
|
|||
};
|
||||
|
||||
if has_gesture {
|
||||
self.notify_event(event_type);
|
||||
self.notify_event(event_type, can_gc);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -245,8 +245,8 @@ impl Gamepad {
|
|||
self.timestamp.set(timestamp);
|
||||
}
|
||||
|
||||
pub fn notify_event(&self, event_type: GamepadEventType) {
|
||||
let event = GamepadEvent::new_with_type(&self.global(), event_type, self, CanGc::note());
|
||||
pub fn notify_event(&self, event_type: GamepadEventType, can_gc: CanGc) {
|
||||
let event = GamepadEvent::new_with_type(&self.global(), event_type, self, can_gc);
|
||||
event
|
||||
.upcast::<Event>()
|
||||
.fire(self.global().as_window().upcast::<EventTarget>());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue