chore: bump chromium to 137.0.7149.0 (main) (#46777)

* chore: bump chromium in DEPS to 137.0.7144.0

* chore: bump chromium in DEPS to 137.0.7145.0

* chore: bump chromium in DEPS to 137.0.7147.0

* chore: update patches

* Remove deprecated GetVar(std::string_view, std::string*) overload

Refs https://chromium-review.googlesource.com/c/chromium/src/+/6468873

* fixup! Remove deprecated GetVar(std::string_view, std::string*) overload

* fixup! Remove deprecated GetVar(std::string_view, std::string*) overload

* chore: bump chromium in DEPS to 137.0.7149.0

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
This commit is contained in:
electron-roller[bot]
2025-04-28 11:39:12 -04:00
committed by GitHub
parent 0c103f390c
commit f2240e07f0
47 changed files with 174 additions and 183 deletions

View File

@@ -48,11 +48,11 @@ void ElectronCrashReporterClient::Create() {
// By setting the BREAKPAD_DUMP_LOCATION environment variable, an alternate
// location to write crash dumps can be set.
auto env = base::Environment::Create();
std::string alternate_crash_dump_location;
base::FilePath crash_dumps_dir_path;
if (env->GetVar("BREAKPAD_DUMP_LOCATION", &alternate_crash_dump_location)) {
if (std::optional<std::string> alternate_crash_dump_location =
env->GetVar("BREAKPAD_DUMP_LOCATION")) {
crash_dumps_dir_path =
base::FilePath::FromUTF8Unsafe(alternate_crash_dump_location);
base::FilePath::FromUTF8Unsafe(alternate_crash_dump_location.value());
}
if (!crash_dumps_dir_path.empty()) {
electron::ScopedAllowBlockingForElectron allow_blocking;

View File

@@ -151,13 +151,18 @@ int NodeMain() {
#endif
#if BUILDFLAG(IS_LINUX)
std::string fd_string, pid_string;
if (os_env->GetVar("CRASHDUMP_SIGNAL_FD", &fd_string) &&
os_env->GetVar("CRASHPAD_HANDLER_PID", &pid_string)) {
int fd = -1, pid = -1;
DCHECK(base::StringToInt(fd_string, &fd));
DCHECK(base::StringToInt(pid_string, &pid));
int pid = -1;
auto* command_line = base::CommandLine::ForCurrentProcess();
std::optional<std::string> fd_string = os_env->GetVar("CRASHDUMP_SIGNAL_FD");
std::optional<std::string> pid_string =
os_env->GetVar("CRASHPAD_HANDLER_PID");
if (fd_string && pid_string) {
int fd = -1;
DCHECK(base::StringToInt(fd_string.value(), &fd));
DCHECK(base::StringToInt(pid_string.value(), &pid));
base::GlobalDescriptors::GetInstance()->Set(kCrashDumpSignal, fd);
command_line->AppendSwitchASCII(
crash_reporter::switches::kCrashpadHandlerPid, pid_string.value());
// Following API is unsafe in multi-threaded scenario, but at this point
// we are still single threaded.
os_env->UnSetVar("CRASHDUMP_SIGNAL_FD");
@@ -200,10 +205,7 @@ int NodeMain() {
#if BUILDFLAG(IS_LINUX)
// On Linux, initialize crashpad after Nodejs init phase so that
// crash and termination signal handlers can be set by the crashpad client.
if (!pid_string.empty()) {
auto* command_line = base::CommandLine::ForCurrentProcess();
command_line->AppendSwitchASCII(
crash_reporter::switches::kCrashpadHandlerPid, pid_string);
if (pid != -1) {
ElectronCrashReporterClient::Create();
crash_reporter::InitializeCrashpad(false, "node");
crash_keys::SetCrashKeysFromCommandLine(