mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +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
1
components/servo/Cargo.lock
generated
1
components/servo/Cargo.lock
generated
|
@ -2409,7 +2409,6 @@ name = "util"
|
|||
version = "0.0.1"
|
||||
dependencies = [
|
||||
"app_units 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"backtrace 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
|
|
@ -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