diff options
author | tanishka <109246904+taniishkaaa@users.noreply.github.com> | 2024-10-20 13:35:11 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-20 08:05:11 +0000 |
commit | a57b6a3f79314910543024c951d365e55efa154e (patch) | |
tree | 1a9ec5c4989abe059b638701fc39da1467505485 /components/script/dom/hashchangeevent.rs | |
parent | d0d02cd56cb646da1f2193e57561b78d5e4b6bdf (diff) | |
download | servo-a57b6a3f79314910543024c951d365e55efa154e.tar.gz servo-a57b6a3f79314910543024c951d365e55efa154e.zip |
CanGc fixes through focusevent.rs & hashchangeevent.rs (#33921)
Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
Diffstat (limited to 'components/script/dom/hashchangeevent.rs')
-rw-r--r-- | components/script/dom/hashchangeevent.rs | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/components/script/dom/hashchangeevent.rs b/components/script/dom/hashchangeevent.rs index 7f4f2bebfee..e39ede9870b 100644 --- a/components/script/dom/hashchangeevent.rs +++ b/components/script/dom/hashchangeevent.rs @@ -35,19 +35,20 @@ impl HashChangeEvent { } } - pub fn new_uninitialized(window: &Window) -> DomRoot<HashChangeEvent> { - Self::new_uninitialized_with_proto(window, None) + pub fn new_uninitialized(window: &Window, can_gc: CanGc) -> DomRoot<HashChangeEvent> { + Self::new_uninitialized_with_proto(window, None, can_gc) } fn new_uninitialized_with_proto( window: &Window, proto: Option<HandleObject>, + can_gc: CanGc, ) -> DomRoot<HashChangeEvent> { reflect_dom_object_with_proto( Box::new(HashChangeEvent::new_inherited(String::new(), String::new())), window, proto, - CanGc::note(), + can_gc, ) } @@ -58,16 +59,10 @@ impl HashChangeEvent { cancelable: bool, old_url: String, new_url: String, + can_gc: CanGc, ) -> DomRoot<HashChangeEvent> { Self::new_with_proto( - window, - None, - type_, - bubbles, - cancelable, - old_url, - new_url, - CanGc::note(), + window, None, type_, bubbles, cancelable, old_url, new_url, can_gc, ) } |