mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Added a dedicated panic channel.
This commit is contained in:
parent
a7c885706e
commit
cfb066ef20
13 changed files with 108 additions and 232 deletions
|
@ -16,7 +16,6 @@ use std::cell::Cell;
|
|||
use std::fmt;
|
||||
use url::Url;
|
||||
use util::geometry::{PagePx, ViewportPx};
|
||||
use util::thread::AddFailureDetails;
|
||||
use webdriver_msg::{LoadStatus, WebDriverScriptCommand};
|
||||
use webrender_traits;
|
||||
|
||||
|
@ -36,29 +35,7 @@ impl<T: Serialize + Deserialize> Clone for ConstellationChan<T> {
|
|||
}
|
||||
}
|
||||
|
||||
// We pass this info to various threads, so it lives in a separate, cloneable struct.
|
||||
#[derive(Clone, Deserialize, Serialize, Debug)]
|
||||
pub struct Failure {
|
||||
pub pipeline_id: PipelineId,
|
||||
pub parent_info: Option<(PipelineId, SubpageId)>,
|
||||
pub panic_message: Option<String>,
|
||||
}
|
||||
|
||||
impl Failure {
|
||||
pub fn new(pipeline_id: PipelineId, parent_info: Option<(PipelineId, SubpageId)>) -> Failure {
|
||||
Failure {
|
||||
pipeline_id: pipeline_id,
|
||||
parent_info: parent_info,
|
||||
panic_message: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl AddFailureDetails for Failure {
|
||||
fn add_panic_message(&mut self, message: String) {
|
||||
self.panic_message = Some(message);
|
||||
}
|
||||
}
|
||||
pub type PanicMsg = (Option<PipelineId>, String);
|
||||
|
||||
#[derive(Copy, Clone, Deserialize, Serialize, HeapSizeOf)]
|
||||
pub struct WindowSizeData {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue