mirror of
https://github.com/servo/servo.git
synced 2025-06-10 09:33:13 +00:00
Move boxing to runnable initialization
This commit is contained in:
parent
5f7324a9a5
commit
ad30275d04
10 changed files with 20 additions and 20 deletions
|
@ -174,10 +174,10 @@ pub struct RunnableWrapper {
|
|||
}
|
||||
|
||||
impl RunnableWrapper {
|
||||
pub fn wrap_runnable<T: Runnable + Send + 'static>(&self, runnable: T) -> Box<Runnable + Send> {
|
||||
pub fn wrap_runnable<T: Runnable + Send + 'static>(&self, runnable: Box<T>) -> Box<Runnable + Send> {
|
||||
box CancellableRunnable {
|
||||
cancelled: self.cancelled.clone(),
|
||||
inner: box runnable,
|
||||
inner: runnable,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1226,7 +1226,7 @@ impl ScriptThread {
|
|||
doc.mut_loader().inhibit_events();
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#the-end step 7
|
||||
let handler = DocumentProgressHandler::new(Trusted::new(doc));
|
||||
let handler = box DocumentProgressHandler::new(Trusted::new(doc));
|
||||
self.dom_manipulation_task_source.queue(handler, doc.window()).unwrap();
|
||||
|
||||
self.constellation_chan.send(ConstellationMsg::LoadComplete(pipeline)).unwrap();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue