blob: f7c4e50b5c656e4bddcc502b2ec40e5a108666af (
plain) (
tree)
|
|
--- electron/shell/app/electron_main_delegate.cc.orig 2023-04-26 18:09:19 UTC
+++ electron/shell/app/electron_main_delegate.cc
@@ -58,13 +58,16 @@
#include "chrome/child/v8_crashpad_support_win.h"
#endif
-#if BUILDFLAG(IS_LINUX)
+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
#include "base/nix/xdg_util.h"
+#endif
+
+#if BUILDFLAG(IS_LINUX)
#include "v8/include/v8-wasm-trap-handler-posix.h"
#include "v8/include/v8.h"
#endif
-#if !IS_MAS_BUILD()
+#if !IS_MAS_BUILD() && !BUILDFLAG(IS_BSD)
#include "components/crash/core/app/crash_switches.h" // nogncheck
#include "components/crash/core/app/crashpad.h" // nogncheck
#include "components/crash/core/common/crash_key.h"
@@ -156,7 +159,7 @@ bool ElectronPathProvider(int key, base::FilePath* res
create_dir = true;
break;
}
-#if BUILDFLAG(IS_LINUX)
+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
case DIR_APP_DATA: {
auto env = base::Environment::Create();
cur = base::nix::GetXDGDirectory(
@@ -288,7 +291,7 @@ absl::optional<int> ElectronMainDelegate::BasicStartup
base::win::PinUser32();
#endif
-#if BUILDFLAG(IS_LINUX)
+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
// Check for --no-sandbox parameter when running as root.
if (getuid() == 0 && IsSandboxEnabled(command_line))
LOG(FATAL) << "Running as root without --"
@@ -340,7 +343,7 @@ void ElectronMainDelegate::PreSandboxStartup() {
process_type == ::switches::kZygoteProcess);
#endif
-#if !IS_MAS_BUILD()
+#if !IS_MAS_BUILD() && !BUILDFLAG(IS_BSD)
crash_reporter::InitializeCrashKeys();
#endif
@@ -375,7 +378,7 @@ void ElectronMainDelegate::PreSandboxStartup() {
}
#endif
-#if !IS_MAS_BUILD()
+#if !IS_MAS_BUILD() && !BUILDFLAG(IS_BSD)
crash_keys::SetCrashKeysFromCommandLine(*command_line);
crash_keys::SetPlatformCrashKey();
#endif
|