CanGc fixes in components/script/dom (#33891)

Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
This commit is contained in:
tanishka 2024-10-18 04:06:04 +05:30 committed by GitHub
parent 9c893c7f4d
commit f826698d6e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 49 additions and 25 deletions

View file

@ -89,7 +89,7 @@ pub trait WorkerEventLoopMethods {
type ControlMsg;
type Event;
fn task_queue(&self) -> &TaskQueue<Self::WorkerMsg>;
fn handle_event(&self, event: Self::Event) -> bool;
fn handle_event(&self, event: Self::Event, can_gc: CanGc) -> bool;
fn handle_worker_post_event(&self, worker: &TrustedWorkerAddress) -> Option<AutoWorkerReset>;
fn from_control_msg(msg: Self::ControlMsg) -> Self::Event;
fn from_worker_msg(msg: Self::WorkerMsg) -> Self::Event;
@ -143,7 +143,7 @@ pub fn run_worker_event_loop<T, WorkerMsg, Event>(
// Step 3
for event in sequential {
let _realm = enter_realm(worker_scope);
if !worker_scope.handle_event(event) {
if !worker_scope.handle_event(event, can_gc) {
// Shutdown
return;
}