Introduce TaskOnce

Having both TaskBox and TaskOnce allows us to remove the superfluous inner boxing
from CancellableTask<T>.
This commit is contained in:
Anthony Ramine 2017-09-20 10:37:09 +02:00
parent 52527d6f9d
commit 6c9fb5ae7a
26 changed files with 144 additions and 124 deletions

View file

@ -440,7 +440,7 @@ impl HTMLFormElement {
let pipeline_id = window.upcast::<GlobalScope>().pipeline_id();
let script_chan = window.main_thread_script_chan().clone();
let this = Trusted::new(self);
let task = box task!(navigate_to_form_planned_navigation: move || {
let task = task!(navigate_to_form_planned_navigation: move || {
if generation_id != this.root().generation_id.get() {
return;
}