mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Introduce TaskOnce
Having both TaskBox and TaskOnce allows us to remove the superfluous inner boxing from CancellableTask<T>.
This commit is contained in:
parent
52527d6f9d
commit
6c9fb5ae7a
26 changed files with 144 additions and 124 deletions
|
@ -275,7 +275,7 @@ fn queue_settle_promise_for_job(job: &Job, settle: SettleType, task_source: &DOM
|
|||
let promise = TrustedPromise::new(job.promise.clone());
|
||||
// FIXME(nox): Why are errors silenced here?
|
||||
let _ = task_source.queue(
|
||||
box task!(settle_promise_for_job: move || {
|
||||
task!(settle_promise_for_job: move || {
|
||||
let promise = promise.root();
|
||||
settle_job_promise(&promise.global(), &promise, settle)
|
||||
}),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue