mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Ensure JS runnables are dispatched to a worker's event loop instead of its parent.
This commit is contained in:
parent
1b524ead1e
commit
0f30755522
6 changed files with 12 additions and 271 deletions
|
@ -347,10 +347,14 @@ impl DedicatedWorkerGlobalScope {
|
|||
|
||||
let runtime = unsafe {
|
||||
if let Some(pipeline_id) = pipeline_id {
|
||||
new_child_runtime(
|
||||
parent,
|
||||
Some(NetworkingTaskSource(parent_sender.clone(), pipeline_id)),
|
||||
)
|
||||
let task_source = NetworkingTaskSource(
|
||||
Box::new(WorkerThreadWorkerChan {
|
||||
sender: own_sender.clone(),
|
||||
worker: worker.clone(),
|
||||
}),
|
||||
pipeline_id,
|
||||
);
|
||||
new_child_runtime(parent, Some(task_source))
|
||||
} else {
|
||||
new_child_runtime(parent, None)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue