diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2016-07-21 11:20:37 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-21 11:20:37 -0500 |
commit | df1b00d43db615244e8e4bcf8296ed51b64249ea (patch) | |
tree | 41ef9ab638ea67979e19ee6914f4f3f206b3f184 /components/layout_thread/lib.rs | |
parent | 07a0c2f1dc87fc21a4ed96d251390a4bff165bda (diff) | |
parent | c889900cff2cde40d21fa27810b9c4b0b57c390a (diff) | |
download | servo-df1b00d43db615244e8e4bcf8296ed51b64249ea.tar.gz servo-df1b00d43db615244e8e4bcf8296ed51b64249ea.zip |
Auto merge of #12468 - asajeffrey:constellation-remove-panic-channel, r=emilio
Removed panic channel, replaced by integrated logging and issue reporting
<!-- Please describe your changes on the following line: -->
Remove the previous ad hoc panic channel, replace it by an integrated logging and panicking mechanism, including crash reporting. All thread panics are now reported, not just content threads.
---
<!-- 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` does not report any errors
- [X] These changes fix #11838
- [X] These changes do not require tests because we don't test error reporting
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12468)
<!-- Reviewable:end -->
Diffstat (limited to 'components/layout_thread/lib.rs')
-rw-r--r-- | components/layout_thread/lib.rs | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/components/layout_thread/lib.rs b/components/layout_thread/lib.rs index 592a6cda6a4..9d576e3bd02 100644 --- a/components/layout_thread/lib.rs +++ b/components/layout_thread/lib.rs @@ -76,7 +76,7 @@ use layout::traversal::RecalcStyleAndConstructFlows; use layout::webrender_helpers::{WebRenderDisplayListConverter, WebRenderFrameBuilder}; use layout::wrapper::{LayoutNodeLayoutData, NonOpaqueStyleAndLayoutData}; use layout_traits::LayoutThreadFactory; -use msg::constellation_msg::{PanicMsg, PipelineId}; +use msg::constellation_msg::PipelineId; use net_traits::image_cache_thread::UsePlaceholder; use net_traits::image_cache_thread::{ImageCacheChan, ImageCacheResult, ImageCacheThread}; use profile_traits::mem::{self, Report, ReportKind, ReportsChan}; @@ -244,7 +244,6 @@ impl LayoutThreadFactory for LayoutThread { chan: (Sender<Msg>, Receiver<Msg>), pipeline_port: IpcReceiver<LayoutControlMsg>, constellation_chan: IpcSender<ConstellationMsg>, - panic_chan: IpcSender<PanicMsg>, script_chan: IpcSender<ConstellationControlMsg>, paint_chan: OptionalIpcSender<LayoutToPaintMsg>, image_cache_thread: ImageCacheThread, @@ -253,9 +252,10 @@ impl LayoutThreadFactory for LayoutThread { mem_profiler_chan: mem::ProfilerChan, content_process_shutdown_chan: IpcSender<()>, webrender_api_sender: Option<webrender_traits::RenderApiSender>) { - thread::spawn_named_with_send_on_panic(format!("LayoutThread {:?}", id), - thread_state::LAYOUT, - move || { + thread::spawn_named(format!("LayoutThread {:?}", id), + move || { + thread_state::initialize(thread_state::LAYOUT); + PipelineId::install(id); { // Ensures layout thread is destroyed before we send shutdown message let sender = chan.0; let layout = LayoutThread::new(id, @@ -278,7 +278,7 @@ impl LayoutThreadFactory for LayoutThread { }, reporter_name, sender, Msg::CollectReports); } let _ = content_process_shutdown_chan.send(()); - }, Some(id), panic_chan); + }); } } @@ -747,7 +747,6 @@ impl LayoutThread { info.layout_pair, info.pipeline_port, info.constellation_chan, - info.panic_chan, info.script_chan.clone(), info.paint_chan.to::<LayoutToPaintMsg>(), self.image_cache_thread.clone(), |