diff options
author | Alan Jeffrey <ajeffrey@mozilla.com> | 2016-04-13 16:09:48 -0500 |
---|---|---|
committer | Alan Jeffrey <ajeffrey@mozilla.com> | 2016-04-13 16:09:48 -0500 |
commit | 8c0fa01884bfb4dcf7d591aa06f48f78f7970766 (patch) | |
tree | c648f5c8cd1d91c2b0866d848697469be32b2512 /components/script_traits/script_msg.rs | |
parent | dfb482a2b7fdb570f34e9092384fa74a3e1b54e3 (diff) | |
download | servo-8c0fa01884bfb4dcf7d591aa06f48f78f7970766.tar.gz servo-8c0fa01884bfb4dcf7d591aa06f48f78f7970766.zip |
Added panic message to failures.
Diffstat (limited to 'components/script_traits/script_msg.rs')
-rw-r--r-- | components/script_traits/script_msg.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/components/script_traits/script_msg.rs b/components/script_traits/script_msg.rs index 10bb4864c4b..23920d150d1 100644 --- a/components/script_traits/script_msg.rs +++ b/components/script_traits/script_msg.rs @@ -32,6 +32,12 @@ pub enum LayoutMsg { ViewportConstrained(PipelineId, ViewportConstraints), } +impl From<Failure> for LayoutMsg { + fn from(failure: Failure) -> LayoutMsg { + LayoutMsg::Failure(failure) + } +} + /// Messages from the script to the constellation. #[derive(Deserialize, Serialize)] pub enum ScriptMsg { @@ -86,3 +92,9 @@ pub enum ScriptMsg { /// Update the pipeline Url, which can change after redirections. SetFinalUrl(PipelineId, Url), } + +impl From<Failure> for ScriptMsg { + fn from(failure: Failure) -> ScriptMsg { + ScriptMsg::Failure(failure) + } +} |