diff options
Diffstat (limited to 'devel/electron18/files/patch-electron_shell_browser_api_electron__api__crash__reporter.cc')
-rw-r--r-- | devel/electron18/files/patch-electron_shell_browser_api_electron__api__crash__reporter.cc | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/devel/electron18/files/patch-electron_shell_browser_api_electron__api__crash__reporter.cc b/devel/electron18/files/patch-electron_shell_browser_api_electron__api__crash__reporter.cc new file mode 100644 index 000000000000..393e66f95902 --- /dev/null +++ b/devel/electron18/files/patch-electron_shell_browser_api_electron__api__crash__reporter.cc @@ -0,0 +1,72 @@ +--- electron/shell/browser/api/electron_api_crash_reporter.cc.orig 2022-05-25 15:32:14 UTC ++++ electron/shell/browser/api/electron_api_crash_reporter.cc +@@ -30,7 +30,7 @@ + #include "shell/common/gin_helper/dictionary.h" + #include "shell/common/node_includes.h" + +-#if !defined(MAS_BUILD) ++#if !defined(MAS_BUILD) && !BUILDFLAG(IS_BSD) + #include "components/crash/core/app/crashpad.h" // nogncheck + #include "components/crash/core/browser/crash_upload_list_crashpad.h" // nogncheck + #include "components/crash/core/common/crash_key.h" +@@ -70,7 +70,7 @@ namespace api { + + namespace crash_reporter { + +-#if defined(MAS_BUILD) ++#if defined(MAS_BUILD) || BUILDFLAG(IS_BSD) + namespace { + + void NoOp() {} +@@ -137,7 +137,7 @@ void Start(const std::string& submit_url, + const std::map<std::string, std::string>& extra, + bool is_node_process) { + TRACE_EVENT0("electron", "crash_reporter::Start"); +-#if !defined(MAS_BUILD) ++#if !defined(MAS_BUILD) && !BUILDFLAG(IS_BSD) + if (g_crash_reporter_initialized) + return; + g_crash_reporter_initialized = true; +@@ -204,7 +204,7 @@ void Start(const std::string& submit_url, + + namespace { + +-#if defined(MAS_BUILD) ++#if defined(MAS_BUILD) || BUILDFLAG(IS_BSD) + void GetUploadedReports( + v8::Isolate* isolate, + base::OnceCallback<void(v8::Local<v8::Value>)> callback) { +@@ -261,13 +261,13 @@ v8::Local<v8::Value> GetUploadedReports(v8::Isolate* i + #endif + + void SetUploadToServer(bool upload) { +-#if !defined(MAS_BUILD) ++#if !defined(MAS_BUILD) && !BUILDFLAG(IS_BSD) + ElectronCrashReporterClient::Get()->SetCollectStatsConsent(upload); + #endif + } + + bool GetUploadToServer() { +-#if defined(MAS_BUILD) ++#if defined(MAS_BUILD) || BUILDFLAG(IS_BSD) + return false; + #else + return ElectronCrashReporterClient::Get()->GetCollectStatsConsent(); +@@ -276,7 +276,7 @@ bool GetUploadToServer() { + + v8::Local<v8::Value> GetParameters(v8::Isolate* isolate) { + std::map<std::string, std::string> keys; +-#if !defined(MAS_BUILD) ++#if !defined(MAS_BUILD) && !BUILDFLAG(IS_BSD) + electron::crash_keys::GetCrashKeys(&keys); + #endif + return gin::ConvertToV8(isolate, keys); +@@ -288,7 +288,7 @@ void Initialize(v8::Local<v8::Object> exports, + void* priv) { + gin_helper::Dictionary dict(context->GetIsolate(), exports); + dict.SetMethod("start", &electron::api::crash_reporter::Start); +-#if defined(MAS_BUILD) ++#if defined(MAS_BUILD) || BUILDFLAG(IS_BSD) + dict.SetMethod("addExtraParameter", &electron::api::crash_reporter::NoOp); + dict.SetMethod("removeExtraParameter", &electron::api::crash_reporter::NoOp); + #else |