aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/task_source
diff options
context:
space:
mode:
authorAnthony Ramine <n.oxyde@gmail.com>2017-09-20 09:59:52 +0200
committerAnthony Ramine <n.oxyde@gmail.com>2017-09-20 10:07:29 +0200
commit52527d6f9dfaae13458059243d975f5336bdead4 (patch)
treea9f1b12f82b2aedbc3d4c46851f9b0d09c3e2576 /components/script/task_source
parentf088b708c93e0a131cbfccf5c9b3797018f1c4ee (diff)
downloadservo-52527d6f9dfaae13458059243d975f5336bdead4.tar.gz
servo-52527d6f9dfaae13458059243d975f5336bdead4.zip
Rename Task to TaskBox
Diffstat (limited to 'components/script/task_source')
-rw-r--r--components/script/task_source/dom_manipulation.rs4
-rw-r--r--components/script/task_source/file_reading.rs8
-rw-r--r--components/script/task_source/mod.rs6
-rw-r--r--components/script/task_source/networking.rs6
-rw-r--r--components/script/task_source/performance_timeline.rs4
-rw-r--r--components/script/task_source/user_interaction.rs4
6 files changed, 16 insertions, 16 deletions
diff --git a/components/script/task_source/dom_manipulation.rs b/components/script/task_source/dom_manipulation.rs
index 4062b5b1495..f5f38e68044 100644
--- a/components/script/task_source/dom_manipulation.rs
+++ b/components/script/task_source/dom_manipulation.rs
@@ -13,7 +13,7 @@ use servo_atoms::Atom;
use std::fmt;
use std::result::Result;
use std::sync::mpsc::Sender;
-use task::{Task, TaskCanceller};
+use task::{TaskBox, TaskCanceller};
use task_source::TaskSource;
#[derive(Clone, JSTraceable)]
@@ -32,7 +32,7 @@ impl TaskSource for DOMManipulationTaskSource {
canceller: &TaskCanceller,
) -> Result<(), ()>
where
- T: Task + 'static,
+ T: TaskBox + 'static,
{
let msg = MainThreadScriptMsg::Common(CommonScriptMsg::Task(
ScriptThreadEventCategory::ScriptEvent,
diff --git a/components/script/task_source/file_reading.rs b/components/script/task_source/file_reading.rs
index 111f07ddba1..2ed44165b92 100644
--- a/components/script/task_source/file_reading.rs
+++ b/components/script/task_source/file_reading.rs
@@ -6,7 +6,7 @@ use dom::domexception::DOMErrorName;
use dom::filereader::{FileReader, TrustedFileReader, GenerationId, ReadMetaData};
use script_runtime::{CommonScriptMsg, ScriptThreadEventCategory, ScriptChan};
use std::sync::Arc;
-use task::{Task, TaskCanceller};
+use task::{TaskBox, TaskCanceller};
use task_source::TaskSource;
#[derive(JSTraceable)]
@@ -25,7 +25,7 @@ impl TaskSource for FileReadingTaskSource {
canceller: &TaskCanceller,
) -> Result<(), ()>
where
- T: Task + 'static,
+ T: TaskBox + 'static,
{
self.0.send(CommonScriptMsg::Task(
ScriptThreadEventCategory::FileRead,
@@ -34,8 +34,8 @@ impl TaskSource for FileReadingTaskSource {
}
}
-impl Task for FileReadingTask {
- fn run(self: Box<Self>) {
+impl TaskBox for FileReadingTask {
+ fn run_box(self: Box<Self>) {
self.handle_task();
}
}
diff --git a/components/script/task_source/mod.rs b/components/script/task_source/mod.rs
index 3c6139b6df3..e361ccf2d99 100644
--- a/components/script/task_source/mod.rs
+++ b/components/script/task_source/mod.rs
@@ -11,7 +11,7 @@ pub mod user_interaction;
use dom::globalscope::GlobalScope;
use std::result::Result;
-use task::{Task, TaskCanceller};
+use task::{TaskBox, TaskCanceller};
pub trait TaskSource {
fn queue_with_canceller<T>(
@@ -20,11 +20,11 @@ pub trait TaskSource {
canceller: &TaskCanceller,
) -> Result<(), ()>
where
- T: Task + 'static;
+ T: TaskBox + 'static;
fn queue<T>(&self, msg: Box<T>, global: &GlobalScope) -> Result<(), ()>
where
- T: Task + 'static,
+ T: TaskBox + 'static,
{
self.queue_with_canceller(msg, &global.task_canceller())
}
diff --git a/components/script/task_source/networking.rs b/components/script/task_source/networking.rs
index 57dabbbfd39..80acc324f52 100644
--- a/components/script/task_source/networking.rs
+++ b/components/script/task_source/networking.rs
@@ -3,7 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use script_runtime::{CommonScriptMsg, ScriptChan, ScriptThreadEventCategory};
-use task::{Task, TaskCanceller};
+use task::{TaskBox, TaskCanceller};
use task_source::TaskSource;
#[derive(JSTraceable)]
@@ -22,7 +22,7 @@ impl TaskSource for NetworkingTaskSource {
canceller: &TaskCanceller,
) -> Result<(), ()>
where
- T: Task + 'static,
+ T: TaskBox + 'static,
{
self.0.send(CommonScriptMsg::Task(
ScriptThreadEventCategory::NetworkEvent,
@@ -36,7 +36,7 @@ impl NetworkingTaskSource {
/// global scope gets destroyed.
pub fn queue_unconditionally<T>(&self, msg: Box<T>) -> Result<(), ()>
where
- T: Task + 'static,
+ T: TaskBox + 'static,
{
self.0.send(CommonScriptMsg::Task(ScriptThreadEventCategory::NetworkEvent, msg))
}
diff --git a/components/script/task_source/performance_timeline.rs b/components/script/task_source/performance_timeline.rs
index 0bac66270f6..3c77c1527fd 100644
--- a/components/script/task_source/performance_timeline.rs
+++ b/components/script/task_source/performance_timeline.rs
@@ -11,7 +11,7 @@ use dom::globalscope::GlobalScope;
use script_runtime::{CommonScriptMsg, ScriptChan, ScriptThreadEventCategory};
use std::fmt;
use std::result::Result;
-use task::{Task, TaskCanceller};
+use task::{TaskBox, TaskCanceller};
use task_source::TaskSource;
#[derive(JSTraceable)]
@@ -36,7 +36,7 @@ impl TaskSource for PerformanceTimelineTaskSource {
canceller: &TaskCanceller,
) -> Result<(), ()>
where
- T: Task + 'static,
+ T: TaskBox + 'static,
{
let msg = CommonScriptMsg::Task(
ScriptThreadEventCategory::PerformanceTimelineTask,
diff --git a/components/script/task_source/user_interaction.rs b/components/script/task_source/user_interaction.rs
index 76321e0fa10..0ca5687fe46 100644
--- a/components/script/task_source/user_interaction.rs
+++ b/components/script/task_source/user_interaction.rs
@@ -13,7 +13,7 @@ use servo_atoms::Atom;
use std::fmt;
use std::result::Result;
use std::sync::mpsc::Sender;
-use task::{Task, TaskCanceller};
+use task::{TaskBox, TaskCanceller};
use task_source::TaskSource;
#[derive(Clone, JSTraceable)]
@@ -32,7 +32,7 @@ impl TaskSource for UserInteractionTaskSource {
canceller: &TaskCanceller,
) -> Result<(), ()>
where
- T: Task + 'static,
+ T: TaskBox + 'static,
{
let msg = MainThreadScriptMsg::Common(CommonScriptMsg::Task(
ScriptThreadEventCategory::InputEvent,