mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Send AsyncJobHandler as a MainThreadTask
This commit is contained in:
parent
4a39631eaf
commit
9a267e53fe
2 changed files with 20 additions and 2 deletions
|
@ -133,8 +133,10 @@ impl JobQueue {
|
|||
if job_queue.is_empty() {
|
||||
let scope_url = job.scope_url.clone();
|
||||
job_queue.push(job);
|
||||
let run_job_handler = box AsyncJobHandler::new(scope_url);
|
||||
let _ = script_thread.dom_manipulation_task_source().queue(run_job_handler, global);
|
||||
let _ = script_thread.dom_manipulation_task_source().queue_main_thread_task(
|
||||
box AsyncJobHandler::new(scope_url),
|
||||
global,
|
||||
);
|
||||
debug!("queued task to run newly-queued job");
|
||||
} else {
|
||||
// Step 2
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue