diff options
author | Anthony Ramine <n.oxyde@gmail.com> | 2017-09-08 10:21:28 +0200 |
---|---|---|
committer | Anthony Ramine <n.oxyde@gmail.com> | 2017-09-08 10:21:28 +0200 |
commit | 0c33d6168e1eda13ee260ee71fa03365ab2cad52 (patch) | |
tree | 6a1f59c915bb3e6222f101e024e5563793cc9d5e | |
parent | 53d30d85b3489b78370c25d404c1095cd6104119 (diff) | |
download | servo-0c33d6168e1eda13ee260ee71fa03365ab2cad52.tar.gz servo-0c33d6168e1eda13ee260ee71fa03365ab2cad52.zip |
Panic from the default impl of Runnable::handler
This will allow us to make sure that tasks using main_thread_handler don't
actually get consumed through a call to the bare handler method.
-rw-r--r-- | components/script/script_thread.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/components/script/script_thread.rs b/components/script/script_thread.rs index 1a69c10dcfa..207e47572e7 100644 --- a/components/script/script_thread.rs +++ b/components/script/script_thread.rs @@ -251,7 +251,9 @@ where pub trait Runnable { fn name(&self) -> &'static str { unsafe { intrinsics::type_name::<Self>() } } - fn handler(self: Box<Self>) {} + fn handler(self: Box<Self>) { + panic!("This should probably be redefined.") + } fn main_thread_handler(self: Box<Self>, _script_thread: &ScriptThread) { self.handler(); } } |