aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/task_source/file_reading.rs
diff options
context:
space:
mode:
authorddh <dianehosfelt@gmail.com>2017-10-24 02:45:55 +0100
committerddh <dianehosfelt@gmail.com>2017-10-25 14:25:58 +0100
commit52b63def44b4819184d2badcc4d123b770a7878a (patch)
treee027a7ad1ab55ab27b71005f0472a38469998267 /components/script/task_source/file_reading.rs
parent2ffbe5398970e54ad55d3e53b495ee6651b64f4c (diff)
downloadservo-52b63def44b4819184d2badcc4d123b770a7878a.tar.gz
servo-52b63def44b4819184d2badcc4d123b770a7878a.zip
added pipelines to all task sources
changed task sources to accept pipeline ids
Diffstat (limited to 'components/script/task_source/file_reading.rs')
-rw-r--r--components/script/task_source/file_reading.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/components/script/task_source/file_reading.rs b/components/script/task_source/file_reading.rs
index 8f4cdd80ac3..e94f957234c 100644
--- a/components/script/task_source/file_reading.rs
+++ b/components/script/task_source/file_reading.rs
@@ -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),
))
}
}