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

@ -1716,7 +1716,7 @@ impl Document {
debug!("Document loads are complete.");
let document = Trusted::new(self);
self.window.dom_manipulation_task_source().queue(
box task!(fire_load_event: move || {
task!(fire_load_event: move || {
let document = document.root();
let window = document.window();
if !window.is_alive() {