diff options
author | Alan Jeffrey <ajeffrey@mozilla.com> | 2016-06-22 17:11:08 -0500 |
---|---|---|
committer | Alan Jeffrey <ajeffrey@mozilla.com> | 2016-07-15 13:44:44 -0500 |
commit | 44422744ff7f095998b07ded6af8fa0420417405 (patch) | |
tree | 293cf34c3972e4d9c66b6792394e4987110f7d50 /components/script_traits/script_msg.rs | |
parent | 175340d1461c3474b49f88131b84298b8d097d36 (diff) | |
download | servo-44422744ff7f095998b07ded6af8fa0420417405.tar.gz servo-44422744ff7f095998b07ded6af8fa0420417405.zip |
Sent log messages to the constellation.
Diffstat (limited to 'components/script_traits/script_msg.rs')
-rw-r--r-- | components/script_traits/script_msg.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/components/script_traits/script_msg.rs b/components/script_traits/script_msg.rs index 0ac5aeae4b4..e510a74a9c1 100644 --- a/components/script_traits/script_msg.rs +++ b/components/script_traits/script_msg.rs @@ -40,6 +40,19 @@ pub enum EventResult { DefaultPrevented, } +/// A log entry reported to the constellation +/// We don't report all log entries, just serious ones. +/// We need a separate type for this because LogLevel isn't serializable. +#[derive(Clone, Debug, Deserialize, Serialize)] +pub enum LogEntry { + /// Panic, with a reason and backtrace + Panic(String, String), + /// Error, with a reason + Error(String), + /// warning, with a reason + Warn(String) +} + /// Messages from the script to the constellation. #[derive(Deserialize, Serialize)] pub enum ScriptMsg { @@ -114,6 +127,8 @@ pub enum ScriptMsg { TouchEventProcessed(EventResult), /// Get Scroll Offset GetScrollOffset(PipelineId, LayerId, IpcSender<Point2D<f32>>), + /// A log entry, with the pipeline id and thread name + LogEntry(Option<PipelineId>, Option<String>, LogEntry), /// Notifies the constellation that this pipeline has exited. PipelineExited(PipelineId), /// Requests that the compositor shut down. |