aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/filereader.rs
diff options
context:
space:
mode:
authorrohan.prinja <rohan.prinja@samsung.com>2015-11-14 05:07:55 +0900
committerRohan Prinja <rohan.prinja@gmail.com>2016-01-10 17:58:13 +0900
commit1f02c4ebbb7d5ea49051f4391f1418f20c15d7a9 (patch)
tree7d61e58e746ddca93074ca6bca6849360a098b8c /components/script/dom/filereader.rs
parentf00532bab0382d1c24e6086314f26497fb6ffe0f (diff)
downloadservo-1f02c4ebbb7d5ea49051f4391f1418f20c15d7a9.tar.gz
servo-1f02c4ebbb7d5ea49051f4391f1418f20c15d7a9.zip
task -> thread
Diffstat (limited to 'components/script/dom/filereader.rs')
-rw-r--r--components/script/dom/filereader.rs24
1 files changed, 12 insertions, 12 deletions
diff --git a/components/script/dom/filereader.rs b/components/script/dom/filereader.rs
index 640cdca19a5..67925cb92a7 100644
--- a/components/script/dom/filereader.rs
+++ b/components/script/dom/filereader.rs
@@ -22,12 +22,12 @@ use encoding::label::encoding_from_whatwg_label;
use encoding::types::{DecoderTrap, EncodingRef};
use hyper::mime::{Attr, Mime};
use rustc_serialize::base64::{CharacterSet, Config, Newline, ToBase64};
-use script_task::ScriptTaskEventCategory::FileRead;
-use script_task::{CommonScriptMsg, Runnable, ScriptChan};
+use script_thread::ScriptThreadEventCategory::FileRead;
+use script_thread::{CommonScriptMsg, Runnable, ScriptChan};
use std::cell::Cell;
use string_cache::Atom;
use util::str::DOMString;
-use util::task::spawn_named;
+use util::thread::spawn_named;
#[derive(PartialEq, Clone, Copy, JSTraceable, HeapSizeOf)]
pub enum FileReaderFunction {
@@ -360,10 +360,10 @@ impl FileReader {
let load_data = ReadMetaData::new(String::from(type_), label.map(String::from), function);
- let fr = Trusted::new(self, global.file_reading_task_source());
+ let fr = Trusted::new(self, global.file_reading_thread_source());
let gen_id = self.generation_id.get();
- let script_chan = global.file_reading_task_source();
+ let script_chan = global.file_reading_thread_source();
spawn_named("file reader async operation".to_owned(), move || {
perform_annotated_read_operation(gen_id, load_data, blob_contents, fr, script_chan)
@@ -404,17 +404,17 @@ impl Runnable for FileReaderEvent {
}
}
-// https://w3c.github.io/FileAPI/#task-read-operation
+// https://w3c.github.io/FileAPI/#thread-read-operation
fn perform_annotated_read_operation(gen_id: GenerationId, data: ReadMetaData, blob_contents: DataSlice,
filereader: TrustedFileReader, script_chan: Box<ScriptChan + Send>) {
let chan = &script_chan;
// Step 4
- let task = box FileReaderEvent::ProcessRead(filereader.clone(), gen_id);
- chan.send(CommonScriptMsg::RunnableMsg(FileRead, task)).unwrap();
+ let thread = box FileReaderEvent::ProcessRead(filereader.clone(), gen_id);
+ chan.send(CommonScriptMsg::RunnableMsg(FileRead, thread)).unwrap();
- let task = box FileReaderEvent::ProcessReadData(filereader.clone(), gen_id);
- chan.send(CommonScriptMsg::RunnableMsg(FileRead, task)).unwrap();
+ let thread = box FileReaderEvent::ProcessReadData(filereader.clone(), gen_id);
+ chan.send(CommonScriptMsg::RunnableMsg(FileRead, thread)).unwrap();
- let task = box FileReaderEvent::ProcessReadEOF(filereader, gen_id, data, blob_contents);
- chan.send(CommonScriptMsg::RunnableMsg(FileRead, task)).unwrap();
+ let thread = box FileReaderEvent::ProcessReadEOF(filereader, gen_id, data, blob_contents);
+ chan.send(CommonScriptMsg::RunnableMsg(FileRead, thread)).unwrap();
}