mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Removed panic channel, replaced by integrated logging and issue reporting.
This commit is contained in:
parent
b34b30fd96
commit
c889900cff
22 changed files with 85 additions and 251 deletions
|
@ -26,7 +26,6 @@ extern crate backtrace;
|
|||
extern crate glutin_app as app;
|
||||
#[cfg(target_os = "android")]
|
||||
extern crate libc;
|
||||
#[cfg(target_os = "android")]
|
||||
#[macro_use]
|
||||
extern crate log;
|
||||
// The Servo engine
|
||||
|
@ -38,8 +37,8 @@ extern crate sig;
|
|||
use servo::Browser;
|
||||
use servo::compositing::windowing::WindowEvent;
|
||||
use servo::util::opts::{self, ArgumentParsingResult};
|
||||
use servo::util::panicking::initiate_panic_hook;
|
||||
use servo::util::servo_version;
|
||||
use std::panic;
|
||||
use std::process;
|
||||
use std::rc::Rc;
|
||||
|
||||
|
@ -94,7 +93,20 @@ fn main() {
|
|||
None
|
||||
};
|
||||
|
||||
initiate_panic_hook();
|
||||
// TODO: once log-panics is released, this can be replaced by
|
||||
// log_panics::init();
|
||||
panic::set_hook(Box::new(|info| {
|
||||
warn!("Panic hook called.");
|
||||
let msg = match info.payload().downcast_ref::<&'static str>() {
|
||||
Some(s) => *s,
|
||||
None => match info.payload().downcast_ref::<String>() {
|
||||
Some(s) => &**s,
|
||||
None => "Box<Any>",
|
||||
},
|
||||
};
|
||||
error!("{}", msg);
|
||||
}));
|
||||
|
||||
setup_logging();
|
||||
|
||||
if let Some(token) = content_process_token {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue