I suspect the issue here is inherited from Chromium. For now, Chromium insists that --enable-crashpad
be automatically enabled on Linux. Here are a few code-samples from the time of this writing:
› chrome/app/chrome_main.cc
#if defined(OS_LINUX)
// TODO(https://crbug.com/1176772): Remove when Chrome Linux is fully migrated
// to Crashpad.
base::CommandLine::ForCurrentProcess()->AppendSwitch(
::switches::kEnableCrashpad);
#endif
This is probably the main block of code in this case. If the user’s OS is Linux, then the Chromium bits automatically add the --enable-crashpad
switch. This is then key in a few other decisions made by the code from that point forward:
› components/crash/core/app/crashpad_linux.cc
bool IsCrashpadEnabled() {
return base::CommandLine::ForCurrentProcess()->HasSwitch(
::switches::kEnableCrashpad);
}
› chrome/browser/chrome_content_browser_client.cc
#if defined(OS_MAC)
…
#elif defined(OS_POSIX)
#if defined(OS_ANDROID)
bool enable_crash_reporter = true;
#else
bool enable_crash_reporter = false;
if (crash_reporter::IsCrashpadEnabled()) {
command_line->AppendSwitch(switches::kEnableCrashpad);
enable_crash_reporter = true;
int fd;
pid_t pid;
if (crash_reporter::GetHandlerSocket(&fd, &pid)) {
command_line->AppendSwitchASCII(
crash_reporter::switches::kCrashpadHandlerPid,
base::NumberToString(pid));
}
} else {
enable_crash_reporter = breakpad::IsCrashReporterEnabled();
}
#endif
…
#endif
› chrome/common/service_process_util.cc
#if defined(OS_LINUX) || defined(OS_CHROMEOS)
if (crash_reporter::IsCrashpadEnabled()) {
command_line->AppendSwitch(switches::kEnableCrashpad);
pid_t pid;
if (crash_reporter::GetHandlerSocket(nullptr, &pid)) {
command_line->AppendSwitchASCII(
crash_reporter::switches::kCrashpadHandlerPid,
base::NumberToString(pid));
}
}
#endif
I’ll check with the core-team to see if this behavior is preserved (and intentionally so) in Brave. Thank you for bringing this to our attention!