mirror of
https://github.com/servo/servo.git
synced 2025-06-14 11:24:33 +00:00
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.
This commit is contained in:
parent
53d30d85b3
commit
0c33d6168e
1 changed files with 3 additions and 1 deletions
|
@ -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(); }
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue