mirror of
https://github.com/servo/servo.git
synced 2025-07-24 15:50:21 +01:00
Added Debug implementations.
This commit is contained in:
parent
07f6e11485
commit
a47e94c8f6
7 changed files with 53 additions and 6 deletions
|
@ -27,6 +27,7 @@ use script_thread::{Runnable, STACK_ROOTS, trace_thread};
|
|||
use servo_config::opts;
|
||||
use servo_config::prefs::PREFS;
|
||||
use std::cell::Cell;
|
||||
use std::fmt;
|
||||
use std::io::{Write, stdout};
|
||||
use std::marker::PhantomData;
|
||||
use std::os;
|
||||
|
@ -45,6 +46,15 @@ pub enum CommonScriptMsg {
|
|||
RunnableMsg(ScriptThreadEventCategory, Box<Runnable + Send>),
|
||||
}
|
||||
|
||||
impl fmt::Debug for CommonScriptMsg {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
match *self {
|
||||
CommonScriptMsg::CollectReports(_) => write!(f, "CollectReports(...)"),
|
||||
CommonScriptMsg::RunnableMsg(category, _) => write!(f, "RunnableMsg({:?}, ...)", category),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// A cloneable interface for communicating with an event loop.
|
||||
pub trait ScriptChan: JSTraceable {
|
||||
/// Send a message to the associated event loop.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue