aboutsummaryrefslogtreecommitdiffstats
path: root/components/script_traits
diff options
context:
space:
mode:
Diffstat (limited to 'components/script_traits')
-rw-r--r--components/script_traits/lib.rs10
-rw-r--r--components/script_traits/script_msg.rs18
2 files changed, 6 insertions, 22 deletions
diff --git a/components/script_traits/lib.rs b/components/script_traits/lib.rs
index 7175536f280..9b3fb014516 100644
--- a/components/script_traits/lib.rs
+++ b/components/script_traits/lib.rs
@@ -41,7 +41,7 @@ use gfx_traits::Epoch;
use gfx_traits::LayerId;
use ipc_channel::ipc::{IpcReceiver, IpcSender};
use libc::c_void;
-use msg::constellation_msg::{ConstellationChan, Failure, PipelineId, WindowSizeData};
+use msg::constellation_msg::{ConstellationChan, PanicMsg, PipelineId, WindowSizeData};
use msg::constellation_msg::{Key, KeyModifiers, KeyState, LoadData};
use msg::constellation_msg::{PipelineNamespaceId, SubpageId};
use msg::webdriver_msg::WebDriverScriptCommand;
@@ -93,10 +93,10 @@ pub struct NewLayoutInfo {
/// The paint channel, cast to `OptionalOpaqueIpcSender`. This is really an
/// `Sender<LayoutToPaintMsg>`.
pub paint_chan: OptionalOpaqueIpcSender,
- /// Information on what to do on thread failure.
- pub failure: Failure,
/// A port on which layout can receive messages from the pipeline.
pub pipeline_port: IpcReceiver<LayoutControlMsg>,
+ /// A channel for sending panics on
+ pub panic_chan: ConstellationChan<PanicMsg>,
/// A shutdown channel so that layout can notify others when it's done.
pub layout_shutdown_chan: IpcSender<()>,
/// A shutdown channel so that layout can tell the content process to shut down when it's done.
@@ -315,10 +315,10 @@ pub struct InitialScriptState {
pub constellation_chan: ConstellationChan<ScriptMsg>,
/// A channel for the layout thread to send messages to the constellation.
pub layout_to_constellation_chan: ConstellationChan<LayoutMsg>,
+ /// A channel for sending panics to the constellation.
+ pub panic_chan: ConstellationChan<PanicMsg>,
/// A channel to schedule timer events.
pub scheduler_chan: IpcSender<TimerEventRequest>,
- /// Information that script sends out when it panics.
- pub failure_info: Failure,
/// A channel to the resource manager thread.
pub resource_thread: ResourceThread,
/// A channel to the storage thread.
diff --git a/components/script_traits/script_msg.rs b/components/script_traits/script_msg.rs
index 23920d150d1..14aa50b6a83 100644
--- a/components/script_traits/script_msg.rs
+++ b/components/script_traits/script_msg.rs
@@ -12,8 +12,8 @@ use canvas_traits::CanvasMsg;
use euclid::point::Point2D;
use euclid::size::Size2D;
use ipc_channel::ipc::IpcSender;
-use msg::constellation_msg::{Failure, NavigationDirection, PipelineId};
use msg::constellation_msg::{LoadData, SubpageId};
+use msg::constellation_msg::{NavigationDirection, PipelineId};
use offscreen_gl_context::{GLContextAttributes, GLLimits};
use style_traits::cursor::Cursor;
use style_traits::viewport::ViewportConstraints;
@@ -24,20 +24,12 @@ use url::Url;
pub enum LayoutMsg {
/// Indicates whether this pipeline is currently running animations.
ChangeRunningAnimationsState(PipelineId, AnimationState),
- /// Layout thread failure.
- Failure(Failure),
/// Requests that the constellation inform the compositor of the a cursor change.
SetCursor(Cursor),
/// Notifies the constellation that the viewport has been constrained in some manner
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 {
@@ -55,8 +47,6 @@ pub enum ScriptMsg {
/// Causes a `load` event to be dispatched to any enclosing frame context element
/// for the given pipeline.
DOMLoad(PipelineId),
- /// Script thread failure.
- Failure(Failure),
/// Notifies the constellation that this frame has received focus.
Focus(PipelineId),
/// Re-send a mouse button event that was sent to the parent window.
@@ -92,9 +82,3 @@ 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)
- }
-}