aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/script_task.rs
diff options
context:
space:
mode:
authorMs2ger <ms2ger@gmail.com>2015-01-10 16:39:00 +0100
committerMs2ger <ms2ger@gmail.com>2015-01-10 17:47:18 +0100
commitb2f40b9873ac828610c3f97bc7408316b1c9c86f (patch)
treebad56b088fc43c228aab25852fd9fbbad676a38b /components/script/script_task.rs
parent14ff55443fc872f0806a6267655689d48002a3b3 (diff)
downloadservo-b2f40b9873ac828610c3f97bc7408316b1c9c86f.tar.gz
servo-b2f40b9873ac828610c3f97bc7408316b1c9c86f.zip
Make Runnable::handler take self by value.
With my thanks to kimundi and eddyb for their help in making this approach work.
Diffstat (limited to 'components/script/script_task.rs')
-rw-r--r--components/script/script_task.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/components/script/script_task.rs b/components/script/script_task.rs
index 4783d8539f4..46488446b9d 100644
--- a/components/script/script_task.rs
+++ b/components/script/script_task.rs
@@ -96,7 +96,7 @@ pub enum TimerSource {
}
pub trait Runnable {
- fn handler(&self);
+ fn handler(self: Box<Self>);
}
/// Messages used to control script event loops, such as ScriptTask and
@@ -1385,7 +1385,7 @@ impl DocumentProgressHandler {
}
impl Runnable for DocumentProgressHandler {
- fn handler(&self) {
+ fn handler(self: Box<DocumentProgressHandler>) {
match self.task {
DocumentProgressTask::DOMContentLoaded => {
self.dispatch_dom_content_loaded();