mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
fix: increase max crash key value length (#24782)
* fix: increase max crash key value length * chore: fix linting * chore: fix linux * Update spec-main/api-crash-reporter-spec.ts Co-authored-by: Jeremy Rose <jeremya@chromium.org> Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com> Co-authored-by: Samuel Attard <sattard@slack-corp.com>
This commit is contained in:
@@ -24,7 +24,19 @@ namespace crash_keys {
|
||||
|
||||
namespace {
|
||||
|
||||
using ExtraCrashKeys = std::deque<crash_reporter::CrashKeyString<127>>;
|
||||
#if defined(OS_LINUX)
|
||||
// Breakpad has a flawed system of calculating the number of chunks
|
||||
// we add 127 bytes to force an extra chunk
|
||||
constexpr size_t kMaxCrashKeyValueSize = 20479;
|
||||
#else
|
||||
constexpr size_t kMaxCrashKeyValueSize = 20320;
|
||||
#endif
|
||||
|
||||
static_assert(kMaxCrashKeyValueSize < crashpad::Annotation::kValueMaxSize,
|
||||
"max crash key value length above what crashpad supports");
|
||||
|
||||
using ExtraCrashKeys =
|
||||
std::deque<crash_reporter::CrashKeyString<kMaxCrashKeyValueSize>>;
|
||||
ExtraCrashKeys& GetExtraCrashKeys() {
|
||||
static base::NoDestructor<ExtraCrashKeys> extra_keys;
|
||||
return *extra_keys;
|
||||
|
||||
Reference in New Issue
Block a user