From c05f0906d55831a97571d9eec13735ebfa975c49 Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Wed, 12 Aug 2015 15:18:17 +0200 Subject: Store a Sender in ScriptTask. --- components/script/script_task.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'components/script/script_task.rs') diff --git a/components/script/script_task.rs b/components/script/script_task.rs index efbad39dc86..43c047c3231 100644 --- a/components/script/script_task.rs +++ b/components/script/script_task.rs @@ -311,7 +311,7 @@ pub struct ScriptTask { chan: NonWorkerScriptChan, /// A channel to hand out to tasks that need to respond to a message from the script task. - control_chan: ScriptControlChan, + control_chan: Sender, /// The port on which the constellation and layout tasks can communicate with the /// script task. @@ -405,7 +405,7 @@ impl ScriptTaskFactory for ScriptTask { parent_info: Option<(PipelineId, SubpageId)>, compositor: ScriptListener, layout_chan: &OpaqueScriptLayoutChannel, - control_chan: ScriptControlChan, + control_chan: Sender, control_port: Receiver, constellation_chan: ConstellationChan, failure_msg: Failure, @@ -542,7 +542,7 @@ impl ScriptTask { pub fn new(compositor: ScriptListener, port: Receiver, chan: NonWorkerScriptChan, - control_chan: ScriptControlChan, + control_chan: Sender, control_port: Receiver, constellation_chan: ConstellationChan, resource_task: Arc, @@ -1053,7 +1053,7 @@ impl ScriptTask { constellation_chan: self.constellation_chan.clone(), failure: failure, paint_chan: paint_chan, - script_chan: self.control_chan.0.clone(), + script_chan: self.control_chan.clone(), image_cache_task: self.image_cache_task.clone(), layout_shutdown_chan: layout_shutdown_chan, }; @@ -1466,7 +1466,7 @@ impl ScriptTask { page.clone(), self.chan.clone(), self.image_cache_channel.clone(), - self.control_chan.clone(), + ScriptControlChan(self.control_chan.clone()), self.compositor.borrow_mut().dup(), self.image_cache_task.clone(), self.resource_task.clone(), -- cgit v1.2.3