mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Prevent moving CanGc values between threads/tasks (#33902)
* Make CanGc non-sendable, and add documentation. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Update CanGc usage to fix usages that were moved between threads/tasks. Signed-off-by: Josh Matthews <josh@joshmatthews.net> --------- Signed-off-by: Josh Matthews <josh@joshmatthews.net>
This commit is contained in:
parent
a58da5aa83
commit
b85093ad74
10 changed files with 69 additions and 89 deletions
|
@ -333,7 +333,6 @@ impl DedicatedWorkerGlobalScope {
|
|||
gpu_id_hub: Arc<IdentityHub>,
|
||||
control_receiver: Receiver<DedicatedWorkerControlMsg>,
|
||||
context_sender: Sender<ThreadSafeJSContext>,
|
||||
can_gc: CanGc,
|
||||
) -> JoinHandle<()> {
|
||||
let serialized_worker_url = worker_url.to_string();
|
||||
let top_level_browsing_context_id = TopLevelBrowsingContextId::installed();
|
||||
|
@ -479,7 +478,7 @@ impl DedicatedWorkerGlobalScope {
|
|||
// until the event loop is destroyed,
|
||||
// which happens after the closing flag is set to true.
|
||||
while !scope.is_closing() {
|
||||
run_worker_event_loop(&*global, Some(&worker), can_gc);
|
||||
run_worker_event_loop(&*global, Some(&worker), CanGc::note());
|
||||
}
|
||||
},
|
||||
reporter_name,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue