diff --git a/atom/common/crash_reporter/crash_reporter_linux.cc b/atom/common/crash_reporter/crash_reporter_linux.cc index 50e1c5ec862c..9020977716ec 100644 --- a/atom/common/crash_reporter/crash_reporter_linux.cc +++ b/atom/common/crash_reporter/crash_reporter_linux.cc @@ -64,13 +64,15 @@ void CrashReporterLinux::InitBreakpad(const std::string& product_name, bool skip_system_crash_handler) { EnableCrashDumping(crashes_dir); - crash_keys_.SetKeyValue("prod", ATOM_PRODUCT_NAME); - crash_keys_.SetKeyValue("ver", version.c_str()); + crash_keys_.reset(new CrashKeyStorage()); + + crash_keys_->SetKeyValue("prod", ATOM_PRODUCT_NAME); + crash_keys_->SetKeyValue("ver", version.c_str()); upload_url_ = submit_url; for (StringMap::const_iterator iter = upload_parameters_.begin(); iter != upload_parameters_.end(); ++iter) - crash_keys_.SetKeyValue(iter->first.c_str(), iter->second.c_str()); + crash_keys_->SetKeyValue(iter->first.c_str(), iter->second.c_str()); } void CrashReporterLinux::SetUploadParameters() { @@ -120,7 +122,7 @@ bool CrashReporterLinux::CrashDone(const MinidumpDescriptor& minidump, info.oom_size = base::g_oom_size; info.pid = self->pid_; info.upload_url = self->upload_url_.c_str(); - info.crash_keys = &self->crash_keys_; + info.crash_keys = self->crash_keys_.get(); HandleCrashDump(info); return true; } diff --git a/atom/common/crash_reporter/crash_reporter_linux.h b/atom/common/crash_reporter/crash_reporter_linux.h index 846e1f1b0a91..997caf1c271e 100644 --- a/atom/common/crash_reporter/crash_reporter_linux.h +++ b/atom/common/crash_reporter/crash_reporter_linux.h @@ -49,7 +49,7 @@ class CrashReporterLinux : public CrashReporter { const bool succeeded); std::unique_ptr breakpad_; - CrashKeyStorage crash_keys_; + std::unique_ptr crash_keys_; uint64_t process_start_time_; pid_t pid_;