diff options
author | Dan Fox <iamdanfox@gmail.com> | 2015-03-05 17:34:18 +0000 |
---|---|---|
committer | Dan Fox <iamdanfox@gmail.com> | 2015-03-05 17:34:18 +0000 |
commit | 19686acdec7a8f6e36fe999a2896ed44718f42d6 (patch) | |
tree | adc8d1b7f13790bee5c34239cf679e5062268e1f /components/layout/layout_task.rs | |
parent | 3441b2c329176fbb3e63b564c6eaef40862be38a (diff) | |
parent | caf5663e0981f36a621dde1dd51be2bd0a15dd24 (diff) | |
download | servo-19686acdec7a8f6e36fe999a2896ed44718f42d6.tar.gz servo-19686acdec7a8f6e36fe999a2896ed44718f42d6.zip |
Merge in servo/master
Diffstat (limited to 'components/layout/layout_task.rs')
-rw-r--r-- | components/layout/layout_task.rs | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/components/layout/layout_task.rs b/components/layout/layout_task.rs index 046d79b1805..e55805486b3 100644 --- a/components/layout/layout_task.rs +++ b/components/layout/layout_task.rs @@ -126,6 +126,9 @@ pub struct LayoutTask { //// The channel to send messages to ourself. pub chan: LayoutChan, + /// The channel on which messages can be sent to the constellation. + pub constellation_chan: ConstellationChan, + /// The channel on which messages can be sent to the script task. pub script_chan: ScriptControlChan, @@ -274,6 +277,7 @@ impl LayoutTask { pipeline_port: pipeline_port, chan: chan, script_chan: script_chan, + constellation_chan: constellation_chan.clone(), paint_chan: paint_chan, time_profiler_chan: time_profiler_chan, resource_task: resource_task, @@ -414,7 +418,7 @@ impl LayoutTask { }, Msg::ReapLayoutData(dead_layout_data) => { unsafe { - LayoutTask::handle_reap_layout_data(dead_layout_data) + self.handle_reap_layout_data(dead_layout_data) } }, Msg::PrepareToExit(response_chan) => { @@ -443,7 +447,7 @@ impl LayoutTask { match self.port.recv().unwrap() { Msg::ReapLayoutData(dead_layout_data) => { unsafe { - LayoutTask::handle_reap_layout_data(dead_layout_data) + self.handle_reap_layout_data(dead_layout_data) } } Msg::ExitNow(exit_type) => { @@ -940,9 +944,9 @@ impl LayoutTask { /// Handles a message to destroy layout data. Layout data must be destroyed on *this* task /// because the struct type is transmuted to a different type on the script side. - unsafe fn handle_reap_layout_data(layout_data: LayoutData) { + unsafe fn handle_reap_layout_data(&self, layout_data: LayoutData) { let layout_data_wrapper: LayoutDataWrapper = mem::transmute(layout_data); - layout_data_wrapper.clear(); + layout_data_wrapper.remove_compositor_layers(self.constellation_chan.clone()); } /// Returns profiling information which is passed to the time profiler. |