cangc fixes in several files + event.rs + rtcpeerconnection.rs (#34002)

Signed-off-by: L Ashwin B <lashwinib@gmail.com>
This commit is contained in:
chickenleaf 2024-10-25 18:14:15 +05:30 committed by GitHub
parent 3b5dc069ae
commit 7ad8822d94
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
37 changed files with 166 additions and 132 deletions

View file

@ -93,7 +93,7 @@ impl OneshotTimerCallback {
match self {
OneshotTimerCallback::XhrTimeout(callback) => callback.invoke(can_gc),
OneshotTimerCallback::EventSourceTimeout(callback) => callback.invoke(),
OneshotTimerCallback::JsTimer(task) => task.invoke(this, js_timers),
OneshotTimerCallback::JsTimer(task) => task.invoke(this, js_timers, can_gc),
OneshotTimerCallback::TestBindingCallback(callback) => callback.invoke(),
OneshotTimerCallback::FakeRequestAnimationFrame(callback) => callback.invoke(can_gc),
OneshotTimerCallback::RefreshRedirectDue(callback) => callback.invoke(can_gc),
@ -537,7 +537,7 @@ fn clamp_duration(nesting_level: u32, unclamped: Duration) -> Duration {
impl JsTimerTask {
// see https://html.spec.whatwg.org/multipage/#timer-initialisation-steps
pub fn invoke<T: DomObject>(self, this: &T, timers: &JsTimers) {
pub fn invoke<T: DomObject>(self, this: &T, timers: &JsTimers, can_gc: CanGc) {
// step 4.1 can be ignored, because we proactively prevent execution
// of this task when its scheduled execution is canceled.
@ -558,7 +558,7 @@ impl JsTimerTask {
rval.handle_mut(),
ScriptFetchOptions::default_classic_script(&global),
global.api_base_url(),
CanGc::note(),
can_gc,
);
},
InternalTimerCallback::FunctionTimerCallback(ref function, ref arguments) => {