aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbors-servo <metajack+bors@gmail.com>2015-01-05 01:27:48 -0700
committerbors-servo <metajack+bors@gmail.com>2015-01-05 01:27:48 -0700
commit65ee8166bd64e911502e29a050258b70d9f263aa (patch)
treece07cf4b6d71f25c645db60d972993ec29755d11
parent499d17f564d699e5e290e8a3859f64e7536827a7 (diff)
parente6b2715186b456b2d64fce20b95f2fa720d20300 (diff)
downloadservo-65ee8166bd64e911502e29a050258b70d9f263aa.tar.gz
servo-65ee8166bd64e911502e29a050258b70d9f263aa.zip
auto merge of #4548 : Ms2ger/servo/cleanup, r=Manishearth
-rw-r--r--components/gfx/paint_task.rs2
-rw-r--r--components/layout/layout_task.rs2
-rw-r--r--components/script/dom/dedicatedworkerglobalscope.rs5
-rw-r--r--components/script/dom/virtualmethods.rs9
-rw-r--r--components/script/script_task.rs2
-rw-r--r--components/util/task.rs7
-rw-r--r--components/util/workqueue.rs4
7 files changed, 10 insertions, 21 deletions
diff --git a/components/gfx/paint_task.rs b/components/gfx/paint_task.rs
index 5fdacfa838d..99e1454e945 100644
--- a/components/gfx/paint_task.rs
+++ b/components/gfx/paint_task.rs
@@ -224,7 +224,7 @@ impl<C> PaintTask<C> where C: PaintListener + Send {
debug!("paint_task: shutdown_chan send");
shutdown_chan.send(());
- }, ConstellationMsg::Failure(failure_msg), c, true);
+ }, ConstellationMsg::Failure(failure_msg), c);
}
fn start(&mut self) {
diff --git a/components/layout/layout_task.rs b/components/layout/layout_task.rs
index 3309ff9c28b..e64ea0f1d22 100644
--- a/components/layout/layout_task.rs
+++ b/components/layout/layout_task.rs
@@ -202,7 +202,7 @@ impl LayoutTaskFactory for LayoutTask {
layout.start();
}
shutdown_chan.send(());
- }, ConstellationMsg::Failure(failure_msg), con_chan, false);
+ }, ConstellationMsg::Failure(failure_msg), con_chan);
}
}
diff --git a/components/script/dom/dedicatedworkerglobalscope.rs b/components/script/dom/dedicatedworkerglobalscope.rs
index 0257f8edc2e..90145ca610e 100644
--- a/components/script/dom/dedicatedworkerglobalscope.rs
+++ b/components/script/dom/dedicatedworkerglobalscope.rs
@@ -23,7 +23,7 @@ use script_task::{ScriptTask, ScriptChan, ScriptMsg, TimerSource};
use script_task::StackRootTLS;
use servo_net::resource_task::{ResourceTask, load_whole_resource};
-use servo_util::task::spawn_named_native;
+use servo_util::task::spawn_named;
use servo_util::task_state;
use servo_util::task_state::{SCRIPT, IN_WORKER};
@@ -135,8 +135,7 @@ impl DedicatedWorkerGlobalScope {
parent_sender: Box<ScriptChan+Send>,
own_sender: Sender<(TrustedWorkerAddress, ScriptMsg)>,
receiver: Receiver<(TrustedWorkerAddress, ScriptMsg)>) {
- spawn_named_native(format!("WebWorker for {}", worker_url.serialize()), proc() {
-
+ spawn_named(format!("WebWorker for {}", worker_url.serialize()), proc() {
task_state::initialize(SCRIPT | IN_WORKER);
let roots = RootCollection::new();
diff --git a/components/script/dom/virtualmethods.rs b/components/script/dom/virtualmethods.rs
index 57578d61dda..adbeb15c2ba 100644
--- a/components/script/dom/virtualmethods.rs
+++ b/components/script/dom/virtualmethods.rs
@@ -50,7 +50,7 @@ use dom::htmlscriptelement::HTMLScriptElement;
use dom::htmlselectelement::HTMLSelectElement;
use dom::htmlstyleelement::HTMLStyleElement;
use dom::htmltableelement::HTMLTableElement;
-use dom::htmltablecellelement::{HTMLTableCellElement, HTMLTableCellElementTypeId};
+use dom::htmltablecellelement::HTMLTableCellElement;
use dom::htmltablerowelement::HTMLTableRowElement;
use dom::htmltablesectionelement::HTMLTableSectionElement;
use dom::htmltextareaelement::HTMLTextAreaElement;
@@ -216,12 +216,7 @@ pub fn vtable_for<'a>(node: &'a JSRef<'a, Node>) -> &'a (VirtualMethods + 'a) {
HTMLTableElementCast::to_borrowed_ref(node).unwrap();
element as &'a (VirtualMethods + 'a)
}
- NodeTypeId::Element(ElementTypeId::HTMLElement(
- HTMLElementTypeId::HTMLTableCellElement(
- HTMLTableCellElementTypeId::HTMLTableDataCellElement))) |
- NodeTypeId::Element(ElementTypeId::HTMLElement(
- HTMLElementTypeId::HTMLTableCellElement(
- HTMLTableCellElementTypeId::HTMLTableHeaderCellElement))) => {
+ NodeTypeId::Element(ElementTypeId::HTMLElement(HTMLElementTypeId::HTMLTableCellElement(_))) => {
let element: &'a JSRef<'a, HTMLTableCellElement> =
HTMLTableCellElementCast::to_borrowed_ref(node).unwrap();
element as &'a (VirtualMethods + 'a)
diff --git a/components/script/script_task.rs b/components/script/script_task.rs
index 2b192c75587..88e6ed860a5 100644
--- a/components/script/script_task.rs
+++ b/components/script/script_task.rs
@@ -314,7 +314,7 @@ impl ScriptTaskFactory for ScriptTask {
// This must always be the very last operation performed before the task completes
failsafe.neuter();
- }, ConstellationMsg::Failure(failure_msg), const_chan, false);
+ }, ConstellationMsg::Failure(failure_msg), const_chan);
}
}
diff --git a/components/util/task.rs b/components/util/task.rs
index 5907841e434..5de066d5823 100644
--- a/components/util/task.rs
+++ b/components/util/task.rs
@@ -16,17 +16,12 @@ pub fn spawn_named<S: IntoMaybeOwned<'static>>(name: S, f: proc():Send) {
});
}
-pub fn spawn_named_native<S: IntoMaybeOwned<'static>>(name: S, f: proc():Send) {
- spawn_named(name, f)
-}
-
/// Arrange to send a particular message to a channel if the task fails.
pub fn spawn_named_with_send_on_failure<T: Send>(name: &'static str,
state: task_state::TaskState,
f: proc(): Send,
msg: T,
- dest: Sender<T>,
- _native: bool) {
+ dest: Sender<T>) {
let future_result = TaskBuilder::new().named(name).try_future(proc() {
task_state::initialize(state);
rtinstrument::instrument(f);
diff --git a/components/util/workqueue.rs b/components/util/workqueue.rs
index 8a224dd6e84..291ff40ca57 100644
--- a/components/util/workqueue.rs
+++ b/components/util/workqueue.rs
@@ -7,7 +7,7 @@
//! Data associated with queues is simply a pair of unsigned integers. It is expected that a
//! higher-level API on top of this could allow safe fork-join parallelism.
-use task::spawn_named_native;
+use task::spawn_named;
use task_state;
use libc::funcs::posix88::unistd::usleep;
@@ -248,7 +248,7 @@ impl<QueueData: Send, WorkData: Send> WorkQueue<QueueData, WorkData> {
// Spawn threads.
for (i, thread) in threads.into_iter().enumerate() {
- spawn_named_native(
+ spawn_named(
format!("{} worker {}/{}", task_name, i+1, thread_count),
proc() {
task_state::initialize(state | task_state::IN_WORKER);