tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit e4aeb6a4de68672ae8d7f6178654104b7b91d566
parent 7452559d1a71bf42efdf56d136c0207ae6797fec
Author: Alex Franchuk <afranchuk@mozilla.com>
Date:   Wed,  1 Oct 2025 13:18:21 +0000

Bug 1991491 - Ensure the background task launched by the crash reporter client doesn't launch its own crash reporter r=gsvelto

Otherwise, if the background task crashes, a loop of crash reporter
clients launching will occur as each tries to launch another background
task to send the crash ping.

Differential Revision: https://phabricator.services.mozilla.com/D266826

Diffstat:
Mtoolkit/crashreporter/client/app/src/net/http.rs | 4++++
Mtoolkit/crashreporter/client/app/src/std/process.rs | 8++++++++
2 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/toolkit/crashreporter/client/app/src/net/http.rs b/toolkit/crashreporter/client/app/src/net/http.rs @@ -148,6 +148,10 @@ impl<'a> RequestBuilder<'a> { cmd.args(["--backgroundtask", "crashreporterNetworkBackend"]); cmd.arg(url); cmd.arg(user_agent()); + // Disable crash reporting in the background task. We don't want a crash in the background + // task to launch another crash reporter flow. See bugs 1991491/1987145. + cmd.env("MOZ_CRASHREPORTER_DISABLE", "1") + .env_remove("MOZ_CRASHREPORTER"); let mut file = TempRequestFile::new()?; serde_json::to_writer(&mut *file, self)?; diff --git a/toolkit/crashreporter/client/app/src/std/process.rs b/toolkit/crashreporter/client/app/src/std/process.rs @@ -70,6 +70,14 @@ impl Command { self } + pub fn env_remove<K>(&mut self, key: K) -> &mut Self + where + K: AsRef<OsStr>, + { + self.env.remove(key.as_ref().into()); + self + } + pub fn stdin<T: Into<Stdio>>(&mut self, _cfg: T) -> &mut Self { self }