mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
added pipelines to all task sources
changed task sources to accept pipeline ids
This commit is contained in:
parent
2ffbe53989
commit
52b63def44
20 changed files with 194 additions and 230 deletions
|
@ -4,17 +4,18 @@
|
|||
|
||||
use dom::domexception::DOMErrorName;
|
||||
use dom::filereader::{FileReader, TrustedFileReader, GenerationId, ReadMetaData};
|
||||
use msg::constellation_msg::PipelineId;
|
||||
use script_runtime::{CommonScriptMsg, ScriptThreadEventCategory, ScriptChan};
|
||||
use std::sync::Arc;
|
||||
use task::{TaskCanceller, TaskOnce};
|
||||
use task_source::TaskSource;
|
||||
|
||||
#[derive(JSTraceable)]
|
||||
pub struct FileReadingTaskSource(pub Box<ScriptChan + Send + 'static>);
|
||||
pub struct FileReadingTaskSource(pub Box<ScriptChan + Send + 'static>, pub PipelineId);
|
||||
|
||||
impl Clone for FileReadingTaskSource {
|
||||
fn clone(&self) -> FileReadingTaskSource {
|
||||
FileReadingTaskSource(self.0.clone())
|
||||
FileReadingTaskSource(self.0.clone(), self.1.clone())
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -30,7 +31,7 @@ impl TaskSource for FileReadingTaskSource {
|
|||
self.0.send(CommonScriptMsg::Task(
|
||||
ScriptThreadEventCategory::FileRead,
|
||||
Box::new(canceller.wrap_task(task)),
|
||||
None //TODO
|
||||
Some(self.1),
|
||||
))
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue