mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Make all task source runnables cancellable
Implement all Runnable methods on CancellableRunnable to redirect to their inner runnable
This commit is contained in:
parent
afc0ccb48d
commit
5f7324a9a5
14 changed files with 69 additions and 58 deletions
|
@ -32,7 +32,6 @@ use std::sync::Arc;
|
|||
use string_cache::Atom;
|
||||
use style::attr::{AttrValue, LengthOrPercentageOrAuto};
|
||||
use task_source::TaskSource;
|
||||
use task_source::dom_manipulation::DOMManipulationTask;
|
||||
use url::Url;
|
||||
|
||||
#[derive(JSTraceable, HeapSizeOf)]
|
||||
|
@ -180,12 +179,12 @@ impl HTMLImageElement {
|
|||
}
|
||||
}
|
||||
|
||||
let runnable = Box::new(ImgParseErrorRunnable {
|
||||
let runnable = ImgParseErrorRunnable {
|
||||
img: Trusted::new(self),
|
||||
src: src.into(),
|
||||
});
|
||||
};
|
||||
let task = window.dom_manipulation_task_source();
|
||||
let _ = task.queue(DOMManipulationTask(runnable));
|
||||
let _ = task.queue(runnable, window);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue