mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Propagate RUST_BACKTRACE to content processes
This commit is contained in:
parent
d433fb01ed
commit
c8f206d0f3
1 changed files with 10 additions and 0 deletions
|
@ -468,6 +468,11 @@ impl<LTF: LayoutThreadFactory, STF: ScriptThreadFactory> Constellation<LTF, STF>
|
||||||
let child_process = if opts::get().sandbox {
|
let child_process = if opts::get().sandbox {
|
||||||
let mut command = sandbox::Command::me().expect("Failed to get current sandbox.");
|
let mut command = sandbox::Command::me().expect("Failed to get current sandbox.");
|
||||||
command.arg("--content-process").arg(token);
|
command.arg("--content-process").arg(token);
|
||||||
|
|
||||||
|
if let Ok(value) = env::var("RUST_BACKTRACE") {
|
||||||
|
command.env("RUST_BACKTRACE", value);
|
||||||
|
}
|
||||||
|
|
||||||
let profile = sandboxing::content_process_sandbox_profile();
|
let profile = sandboxing::content_process_sandbox_profile();
|
||||||
ChildProcess::Sandboxed(Sandbox::new(profile).start(&mut command)
|
ChildProcess::Sandboxed(Sandbox::new(profile).start(&mut command)
|
||||||
.expect("Failed to start sandboxed child process!"))
|
.expect("Failed to start sandboxed child process!"))
|
||||||
|
@ -477,6 +482,11 @@ impl<LTF: LayoutThreadFactory, STF: ScriptThreadFactory> Constellation<LTF, STF>
|
||||||
let mut child_process = process::Command::new(path_to_self);
|
let mut child_process = process::Command::new(path_to_self);
|
||||||
child_process.arg("--content-process");
|
child_process.arg("--content-process");
|
||||||
child_process.arg(token);
|
child_process.arg(token);
|
||||||
|
|
||||||
|
if let Ok(value) = env::var("RUST_BACKTRACE") {
|
||||||
|
child_process.env("RUST_BACKTRACE", value);
|
||||||
|
}
|
||||||
|
|
||||||
ChildProcess::Unsandboxed(child_process.spawn()
|
ChildProcess::Unsandboxed(child_process.spawn()
|
||||||
.expect("Failed to start unsandboxed child process!"))
|
.expect("Failed to start unsandboxed child process!"))
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue