CanGc fixes from EventTarget::fire_event (#33985)

Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
This commit is contained in:
tanishka 2024-10-24 04:18:19 +05:30 committed by GitHub
parent bb4932026c
commit ea875f0a51
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
35 changed files with 155 additions and 115 deletions

View file

@ -118,7 +118,7 @@ impl EventSourceContext {
let event_source = event_source.root();
if event_source.ready_state.get() != ReadyState::Closed {
event_source.ready_state.set(ReadyState::Open);
event_source.upcast::<EventTarget>().fire_event(atom!("open"));
event_source.upcast::<EventTarget>().fire_event(atom!("open"), CanGc::note());
}
}),
&global,
@ -159,7 +159,7 @@ impl EventSourceContext {
event_source.ready_state.set(ReadyState::Connecting);
// Step 1.3.
event_source.upcast::<EventTarget>().fire_event(atom!("error"));
event_source.upcast::<EventTarget>().fire_event(atom!("error"), CanGc::note());
// Step 2.
let duration = event_source.reconnection_time.get();
@ -438,7 +438,7 @@ impl FetchResponseListener for EventSourceContext {
}
fn submit_resource_timing(&mut self) {
network_listener::submit_timing(self)
network_listener::submit_timing(self, CanGc::note())
}
}
@ -505,7 +505,7 @@ impl EventSource {
let event_source = event_source.root();
if event_source.ready_state.get() != ReadyState::Closed {
event_source.ready_state.set(ReadyState::Closed);
event_source.upcast::<EventTarget>().fire_event(atom!("error"));
event_source.upcast::<EventTarget>().fire_event(atom!("error"), CanGc::note());
}
}),
&global,