diff --git a/components/layout/layout_task.rs b/components/layout/layout_task.rs index 76baafc8013..3b3ae0e4009 100644 --- a/components/layout/layout_task.rs +++ b/components/layout/layout_task.rs @@ -1197,8 +1197,7 @@ impl LayoutTask { // FIXME(pcwalton): This should probably be *one* channel, but we can't fix this without // either select or a filtered recv() that only looks for messages of a given type. data.script_join_chan.send(()).unwrap(); - let ScriptControlChan(ref chan) = data.script_chan; - chan.send(ConstellationControlMsg::ReflowComplete(self.id, data.id)).unwrap(); + data.script_chan.send(ConstellationControlMsg::ReflowComplete(self.id, data.id)).unwrap(); } fn set_visible_rects<'a>(&'a self, diff --git a/components/script/dom/window.rs b/components/script/dom/window.rs index f2c92b79ed9..3190e6081dc 100644 --- a/components/script/dom/window.rs +++ b/components/script/dom/window.rs @@ -36,7 +36,7 @@ use layout_interface::{ContentBoxResponse, ContentBoxesResponse, ResolvedStyleRe use page::Page; use script_task::{TimerSource, ScriptChan, ScriptPort, NonWorkerScriptChan}; use script_task::ScriptMsg; -use script_traits::{ConstellationControlMsg, ScriptControlChan}; +use script_traits::ConstellationControlMsg; use timers::{IsInterval, TimerId, TimerManager, TimerCallback}; use webdriver_handlers::jsval_to_webdriver; @@ -744,7 +744,7 @@ impl<'a> WindowHelpers for &'a Window { }, document_root: root.to_trusted_node_address(), window_size: window_size, - script_chan: ScriptControlChan(self.control_chan.clone()), + script_chan: self.control_chan.clone(), script_join_chan: join_chan, id: last_reflow_id.get(), query_type: query_type, diff --git a/components/script/layout_interface.rs b/components/script/layout_interface.rs index a6fb9ad8491..53ab48a7769 100644 --- a/components/script/layout_interface.rs +++ b/components/script/layout_interface.rs @@ -19,7 +19,7 @@ use msg::compositor_msg::Epoch; use net_traits::image_cache_task::ImageCacheTask; use net_traits::PendingAsyncLoad; use profile_traits::mem::ReportsChan; -use script_traits::{ConstellationControlMsg, LayoutControlMsg, ScriptControlChan}; +use script_traits::{ConstellationControlMsg, LayoutControlMsg}; use script_traits::{OpaqueScriptLayoutChannel, StylesheetLoadResponder, UntrustedNodeAddress}; use selectors::parser::PseudoElement; use std::any::Any; @@ -167,7 +167,7 @@ pub struct ScriptReflow { /// The document node. pub document_root: TrustedNodeAddress, /// The channel through which messages can be sent back to the script task. - pub script_chan: ScriptControlChan, + pub script_chan: Sender, /// The current window size. pub window_size: WindowSizeData, /// The channel that we send a notification to.