aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/keyboardevent.rs
diff options
context:
space:
mode:
authortanishka <109246904+taniishkaaa@users.noreply.github.com>2024-10-18 17:22:37 +0530
committerGitHub <noreply@github.com>2024-10-18 11:52:37 +0000
commit6b87ecc291b08559cd2bbda8e4902f70a0fd0c7c (patch)
treeee302e7a7fbc8fd5cfadb00f2ecabd5359696dae /components/script/dom/keyboardevent.rs
parente33bae6d0a172de3e652b9b515bda97c6c4f5af2 (diff)
downloadservo-6b87ecc291b08559cd2bbda8e4902f70a0fd0c7c.tar.gz
servo-6b87ecc291b08559cd2bbda8e4902f70a0fd0c7c.zip
Some CanGc fixes in components/script/dom (#33895)
Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
Diffstat (limited to 'components/script/dom/keyboardevent.rs')
-rw-r--r--components/script/dom/keyboardevent.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/components/script/dom/keyboardevent.rs b/components/script/dom/keyboardevent.rs
index fbf1268b2d2..f8454a54905 100644
--- a/components/script/dom/keyboardevent.rs
+++ b/components/script/dom/keyboardevent.rs
@@ -54,8 +54,8 @@ impl KeyboardEvent {
}
}
- pub fn new_uninitialized(window: &Window) -> DomRoot<KeyboardEvent> {
- Self::new_uninitialized_with_proto(window, None, CanGc::note())
+ pub fn new_uninitialized(window: &Window, can_gc: CanGc) -> DomRoot<KeyboardEvent> {
+ Self::new_uninitialized_with_proto(window, None, can_gc)
}
fn new_uninitialized_with_proto(
@@ -87,6 +87,7 @@ impl KeyboardEvent {
modifiers: Modifiers,
char_code: u32,
key_code: u32,
+ can_gc: CanGc,
) -> DomRoot<KeyboardEvent> {
Self::new_with_proto(
window,
@@ -104,7 +105,7 @@ impl KeyboardEvent {
modifiers,
char_code,
key_code,
- CanGc::note(),
+ can_gc,
)
}