ports/devel/electron28/files/patch-electron_shell_app_node__main.cc
Hiroki Tagato f12d584693 devel/electron28: update to 28.2.1
Changelog: https://github.com/electron/electron/releases/tag/v28.2.1

Reported by:	GitHub (watch releases)
Security:	13a8c4bf-cb2b-48ec-b49c-a3875c72b3e8
2024-02-03 08:00:14 +09:00

38 lines
1.4 KiB
C++

--- electron/shell/app/node_main.cc.orig 2024-01-31 15:12:32 UTC
+++ electron/shell/app/node_main.cc
@@ -47,7 +47,7 @@
#include "shell/common/mac/codesign_util.h"
#endif
-#if !IS_MAS_BUILD()
+#if !IS_MAS_BUILD() && !BUILDFLAG(IS_BSD)
#include "components/crash/core/app/crashpad.h" // nogncheck
#include "shell/app/electron_crash_reporter_client.h"
#include "shell/common/crash_keys.h"
@@ -99,7 +99,7 @@ bool UnsetHijackableEnvs(base::Environment* env) {
}
#endif
-#if IS_MAS_BUILD()
+#if IS_MAS_BUILD() || BUILDFLAG(IS_BSD)
void SetCrashKeyStub(const std::string& key, const std::string& value) {}
void ClearCrashKeyStub(const std::string& key) {}
#endif
@@ -110,7 +110,7 @@ v8::Local<v8::Value> GetParameters(v8::Isolate* isolat
v8::Local<v8::Value> GetParameters(v8::Isolate* isolate) {
std::map<std::string, std::string> keys;
-#if !IS_MAS_BUILD()
+#if !IS_MAS_BUILD() && !BUILDFLAG(IS_BSD)
electron::crash_keys::GetCrashKeys(&keys);
#endif
return gin::ConvertToV8(isolate, keys);
@@ -271,7 +271,7 @@ int NodeMain(int argc, char* argv[]) {
// Setup process.crashReporter in child node processes
auto reporter = gin_helper::Dictionary::CreateEmpty(isolate);
reporter.SetMethod("getParameters", &GetParameters);
-#if IS_MAS_BUILD()
+#if IS_MAS_BUILD() || BUILDFLAG(IS_BSD)
reporter.SetMethod("addExtraParameter", &SetCrashKeyStub);
reporter.SetMethod("removeExtraParameter", &ClearCrashKeyStub);
#else