aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/script_thread.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/script_thread.rs')
-rw-r--r--components/script/script_thread.rs10
1 files changed, 4 insertions, 6 deletions
diff --git a/components/script/script_thread.rs b/components/script/script_thread.rs
index 05689baac39..8a7fc82f52e 100644
--- a/components/script/script_thread.rs
+++ b/components/script/script_thread.rs
@@ -200,11 +200,9 @@ impl<T: Runnable + Send> Runnable for CancellableRunnable<T> {
pub trait Runnable {
fn is_cancelled(&self) -> bool { false }
- fn handler(self: Box<Self>);
-}
-
-pub trait MainThreadRunnable {
- fn handler(self: Box<Self>, script_thread: &ScriptThread);
+ fn name(&self) -> &'static str { "generic runnable" }
+ fn handler(self: Box<Self>) {}
+ fn main_thread_handler(self: Box<Self>, _script_thread: &ScriptThread) { self.handler(); }
}
enum MixedMessage {
@@ -1223,7 +1221,7 @@ impl ScriptThread {
// https://html.spec.whatwg.org/multipage/#the-end step 7
let handler = box DocumentProgressHandler::new(Trusted::new(doc));
- self.dom_manipulation_task_source.queue(DOMManipulationTask::DocumentProgress(handler)).unwrap();
+ self.dom_manipulation_task_source.queue(DOMManipulationTask::Runnable(handler)).unwrap();
self.constellation_chan.send(ConstellationMsg::LoadComplete(pipeline)).unwrap();
}