mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Add option for printing full backtraces
This commit is contained in:
parent
1aa6d558ac
commit
a2c82a03ba
2 changed files with 16 additions and 0 deletions
|
@ -3,6 +3,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use ipc_channel::ipc::IpcSender;
|
||||
use opts;
|
||||
use serde::Serialize;
|
||||
use std::borrow::ToOwned;
|
||||
use std::io::{Write, stderr};
|
||||
|
@ -17,6 +18,11 @@ pub fn spawn_named<F>(name: String, f: F)
|
|||
{
|
||||
let builder = thread::Builder::new().name(name);
|
||||
|
||||
if opts::get().full_backtraces {
|
||||
builder.spawn(f).unwrap();
|
||||
return;
|
||||
}
|
||||
|
||||
let f_with_handler = move || {
|
||||
let hook = take_handler();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue