mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
CanGc fixes through focusevent.rs & hashchangeevent.rs (#33921)
Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
This commit is contained in:
parent
d0d02cd56c
commit
a57b6a3f79
20 changed files with 140 additions and 69 deletions
|
@ -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,
|
||||
)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue