mirror of
https://github.com/servo/servo.git
synced 2025-08-10 16:05:43 +01:00
Propagate CanGc
arguments through callers in constructors (#35541)
Signed-off-by: Auguste Baum <auguste.apple@gmail.com>
This commit is contained in:
parent
5465bfc2af
commit
863d2ce871
260 changed files with 986 additions and 603 deletions
|
@ -33,12 +33,8 @@ impl BeforeUnloadEvent {
|
|||
}
|
||||
}
|
||||
|
||||
pub(crate) fn new_uninitialized(window: &Window) -> DomRoot<BeforeUnloadEvent> {
|
||||
reflect_dom_object(
|
||||
Box::new(BeforeUnloadEvent::new_inherited()),
|
||||
window,
|
||||
CanGc::note(),
|
||||
)
|
||||
pub(crate) fn new_uninitialized(window: &Window, can_gc: CanGc) -> DomRoot<BeforeUnloadEvent> {
|
||||
reflect_dom_object(Box::new(BeforeUnloadEvent::new_inherited()), window, can_gc)
|
||||
}
|
||||
|
||||
pub(crate) fn new(
|
||||
|
@ -47,7 +43,7 @@ impl BeforeUnloadEvent {
|
|||
bubbles: EventBubbles,
|
||||
cancelable: EventCancelable,
|
||||
) -> DomRoot<BeforeUnloadEvent> {
|
||||
let ev = BeforeUnloadEvent::new_uninitialized(window);
|
||||
let ev = BeforeUnloadEvent::new_uninitialized(window, CanGc::note());
|
||||
{
|
||||
let event = ev.upcast::<Event>();
|
||||
event.init_event(type_, bool::from(bubbles), bool::from(cancelable));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue