diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2016-05-19 12:38:26 -0700 |
---|---|---|
committer | bors-servo <lbergstrom+bors@mozilla.com> | 2016-05-19 12:38:26 -0700 |
commit | 27c25e859a45c3d79c85e96b85ec5226a3231e10 (patch) | |
tree | b791aaf1184a1223f27c36bacb10ea35f6dcf494 /components/layout/layout_thread.rs | |
parent | 5bf28491605096e85c6170a7c419e3f8077715bc (diff) | |
parent | cc2b2b50a74515700b6cae88c66e734312d1fdbb (diff) | |
download | servo-27c25e859a45c3d79c85e96b85ec5226a3231e10.tar.gz servo-27c25e859a45c3d79c85e96b85ec5226a3231e10.zip |
Auto merge of #11270 - servo:ConstellationChan, r=asajeffrey
Remove ConstellationChan.
Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data:
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy --faster` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).
Either:
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because _____
Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process.
It's a pointless abstraction that propagates the obsolete chan terminology,
swaps the order in which the sender and receiver are returned, and hides a
source of panics.
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11270)
<!-- Reviewable:end -->
Diffstat (limited to 'components/layout/layout_thread.rs')
-rw-r--r-- | components/layout/layout_thread.rs | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/components/layout/layout_thread.rs b/components/layout/layout_thread.rs index e20e0865b4c..2a6fda09344 100644 --- a/components/layout/layout_thread.rs +++ b/components/layout/layout_thread.rs @@ -37,7 +37,7 @@ use ipc_channel::router::ROUTER; use layout_debug; use layout_traits::{ConvertPipelineIdToWebRender, LayoutThreadFactory}; use log; -use msg::constellation_msg::{ConstellationChan, PanicMsg, PipelineId}; +use msg::constellation_msg::{PanicMsg, PipelineId}; use net_traits::image_cache_thread::{ImageCacheChan, ImageCacheResult, ImageCacheThread}; use net_traits::image_cache_thread::{UsePlaceholder}; use parallel; @@ -100,7 +100,7 @@ const DISPLAY_PORT_THRESHOLD_SIZE_FACTOR: i32 = 4; /// This needs to be protected by a mutex so we can do fast RPCs. pub struct LayoutThreadData { /// The channel on which messages can be sent to the constellation. - pub constellation_chan: ConstellationChan<ConstellationMsg>, + pub constellation_chan: IpcSender<ConstellationMsg>, /// The root stacking context. pub display_list: Option<Arc<DisplayList>>, @@ -168,7 +168,7 @@ pub struct LayoutThread { font_cache_sender: IpcSender<()>, /// The channel on which messages can be sent to the constellation. - constellation_chan: ConstellationChan<ConstellationMsg>, + constellation_chan: IpcSender<ConstellationMsg>, /// The channel on which messages can be sent to the script thread. script_chan: IpcSender<ConstellationControlMsg>, @@ -253,8 +253,8 @@ impl LayoutThreadFactory for LayoutThread { is_iframe: bool, chan: OpaqueScriptLayoutChannel, pipeline_port: IpcReceiver<LayoutControlMsg>, - constellation_chan: ConstellationChan<ConstellationMsg>, - panic_chan: ConstellationChan<PanicMsg>, + constellation_chan: IpcSender<ConstellationMsg>, + panic_chan: IpcSender<PanicMsg>, script_chan: IpcSender<ConstellationControlMsg>, paint_chan: OptionalIpcSender<LayoutToPaintMsg>, image_cache_thread: ImageCacheThread, @@ -264,7 +264,6 @@ impl LayoutThreadFactory for LayoutThread { shutdown_chan: IpcSender<()>, content_process_shutdown_chan: IpcSender<()>, webrender_api_sender: Option<webrender_traits::RenderApiSender>) { - let ConstellationChan(fail_chan) = panic_chan.clone(); thread::spawn_named_with_send_on_panic(format!("LayoutThread {:?}", id), thread_state::LAYOUT, move || { @@ -291,7 +290,7 @@ impl LayoutThreadFactory for LayoutThread { } let _ = shutdown_chan.send(()); let _ = content_process_shutdown_chan.send(()); - }, Some(id), fail_chan); + }, Some(id), panic_chan); } } @@ -385,7 +384,7 @@ impl LayoutThread { is_iframe: bool, port: Receiver<Msg>, pipeline_port: IpcReceiver<LayoutControlMsg>, - constellation_chan: ConstellationChan<ConstellationMsg>, + constellation_chan: IpcSender<ConstellationMsg>, script_chan: IpcSender<ConstellationControlMsg>, paint_chan: OptionalIpcSender<LayoutToPaintMsg>, image_cache_thread: ImageCacheThread, @@ -1080,9 +1079,9 @@ impl LayoutThread { if viewport_size_changed { if let Some(constraints) = constraints { // let the constellation know about the viewport constraints - let ConstellationChan(ref constellation_chan) = rw_data.constellation_chan; - constellation_chan.send(ConstellationMsg::ViewportConstrained( - self.id, constraints)).unwrap(); + rw_data.constellation_chan + .send(ConstellationMsg::ViewportConstrained(self.id, constraints)) + .unwrap(); } // FIXME (#10104): Only dirty nodes affected by vh/vw/vmin/vmax styles. if data.document_stylesheets.iter().any(|sheet| sheet.dirty_on_viewport_size_change) { |