Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: avoid crash after upgrade on Linux #41046

Merged
merged 1 commit into from
May 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions shell/browser/electron_browser_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,15 @@ void ElectronBrowserClient::AppendExtraCommandLineSwitches(
base::CommandLine* command_line,
int process_id) {
// Make sure we're about to launch a known executable
#if BUILDFLAG(IS_LINUX)
// On Linux, do not perform this check for /proc/self/exe. It will always
// point to the currently running executable so this check is not
// necessary, and if the executable has been deleted it will return a fake
// name that causes this check to fail.
if (command_line->GetProgram() != base::FilePath(base::kProcSelfExe)) {
#else
{
#endif
ScopedAllowBlockingForElectron allow_blocking;
base::FilePath child_path;
base::FilePath program =
Expand Down