mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
CanGc fixes originating from gamepadevent.rs
& stereopannernode.rs
(#33828)
* CanGc fixes originating from gamepadevent.rs & stereopannernode.rs Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com> * Revert changes within task! macro Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com> --------- Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
This commit is contained in:
parent
2322b22a6b
commit
cfd15dd14d
5 changed files with 10 additions and 14 deletions
|
@ -45,16 +45,9 @@ impl GamepadEvent {
|
|||
bubbles: bool,
|
||||
cancelable: bool,
|
||||
gamepad: &Gamepad,
|
||||
can_gc: CanGc,
|
||||
) -> DomRoot<GamepadEvent> {
|
||||
Self::new_with_proto(
|
||||
global,
|
||||
None,
|
||||
type_,
|
||||
bubbles,
|
||||
cancelable,
|
||||
gamepad,
|
||||
CanGc::note(),
|
||||
)
|
||||
Self::new_with_proto(global, None, type_, bubbles, cancelable, gamepad, can_gc)
|
||||
}
|
||||
|
||||
fn new_with_proto(
|
||||
|
@ -83,13 +76,14 @@ impl GamepadEvent {
|
|||
global: &GlobalScope,
|
||||
event_type: GamepadEventType,
|
||||
gamepad: &Gamepad,
|
||||
can_gc: CanGc,
|
||||
) -> DomRoot<GamepadEvent> {
|
||||
let name = match event_type {
|
||||
GamepadEventType::Connected => "gamepadconnected",
|
||||
GamepadEventType::Disconnected => "gamepaddisconnected",
|
||||
};
|
||||
|
||||
GamepadEvent::new(global, name.into(), false, false, gamepad)
|
||||
GamepadEvent::new(global, name.into(), false, false, gamepad, can_gc)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue