mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
fix: crash dump location on Linux (#31712)
* fix: crash dump location on Linux * fix: ignore client_id for Zygote process * chore: update comment Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com> Co-authored-by: deepak1556 <hop2deep@gmail.com>
This commit is contained in:
@@ -131,11 +131,7 @@ bool ElectronPathProvider(int key, base::FilePath* result) {
|
||||
case DIR_CRASH_DUMPS:
|
||||
if (!base::PathService::Get(chrome::DIR_USER_DATA, &cur))
|
||||
return false;
|
||||
#if defined(OS_MAC) || defined(OS_WIN)
|
||||
cur = cur.Append(FILE_PATH_LITERAL("Crashpad"));
|
||||
#else
|
||||
cur = cur.Append(FILE_PATH_LITERAL("Crash Reports"));
|
||||
#endif
|
||||
create_dir = true;
|
||||
break;
|
||||
case chrome::DIR_APP_DICTIONARIES:
|
||||
|
||||
@@ -552,7 +552,11 @@ void ElectronBrowserClient::AppendExtraCommandLineSwitches(
|
||||
enable_crash_reporter = breakpad::IsCrashReporterEnabled();
|
||||
}
|
||||
|
||||
if (enable_crash_reporter) {
|
||||
// Zygote Process gets booted before any JS runs, accessing GetClientId
|
||||
// will end up touching DIR_USER_DATA path provider and this will
|
||||
// configure default value because app.name from browser_init has
|
||||
// not run yet.
|
||||
if (enable_crash_reporter && process_type != ::switches::kZygoteProcess) {
|
||||
std::string switch_value =
|
||||
api::crash_reporter::GetClientId() + ",no_channel";
|
||||
command_line->AppendSwitchASCII(::switches::kEnableCrashReporter,
|
||||
|
||||
Reference in New Issue
Block a user