mirror of
https://github.com/chromium/crashpad.git
synced 2025-03-09 14:06:33 +00:00
Initialize process snapshot client ids to zero.
Change-Id: If6e1902d62e6364114a75d8ebc4d260e4239d58b Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3296266 Commit-Queue: Justin Cohen <justincohen@chromium.org> Reviewed-by: Mark Mentovai <mark@chromium.org>
This commit is contained in:
parent
c7ce2e3ec1
commit
bc138fc01c
@ -184,13 +184,9 @@ bool CrashReportExceptionHandler::HandleExceptionWithConnection(
|
|||||||
|
|
||||||
UUID client_id;
|
UUID client_id;
|
||||||
Settings* const settings = database_->GetSettings();
|
Settings* const settings = database_->GetSettings();
|
||||||
if (settings) {
|
if (settings && settings->GetClientID(&client_id)) {
|
||||||
// If GetSettings() or GetClientID() fails, something else will log a
|
process_snapshot->SetClientID(client_id);
|
||||||
// message and client_id will be left at its default value, all zeroes,
|
|
||||||
// which is appropriate.
|
|
||||||
settings->GetClientID(&client_id);
|
|
||||||
}
|
}
|
||||||
process_snapshot->SetClientID(client_id);
|
|
||||||
|
|
||||||
return write_minidump_to_database_
|
return write_minidump_to_database_
|
||||||
? WriteMinidumpToDatabase(process_snapshot.get(),
|
? WriteMinidumpToDatabase(process_snapshot.get(),
|
||||||
|
@ -147,14 +147,9 @@ kern_return_t CrashReportExceptionHandler::CatchMachException(
|
|||||||
|
|
||||||
UUID client_id;
|
UUID client_id;
|
||||||
Settings* const settings = database_->GetSettings();
|
Settings* const settings = database_->GetSettings();
|
||||||
if (settings) {
|
if (settings && settings->GetClientID(&client_id)) {
|
||||||
// If GetSettings() or GetClientID() fails, something else will log a
|
process_snapshot.SetClientID(client_id);
|
||||||
// message and client_id will be left at its default value, all zeroes,
|
|
||||||
// which is appropriate.
|
|
||||||
settings->GetClientID(&client_id);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
process_snapshot.SetClientID(client_id);
|
|
||||||
process_snapshot.SetAnnotationsSimpleMap(*process_annotations_);
|
process_snapshot.SetAnnotationsSimpleMap(*process_annotations_);
|
||||||
|
|
||||||
std::unique_ptr<CrashReportDatabase::NewReport> new_report;
|
std::unique_ptr<CrashReportDatabase::NewReport> new_report;
|
||||||
|
@ -82,14 +82,10 @@ unsigned int CrashReportExceptionHandler::ExceptionHandlerServerException(
|
|||||||
if (client_options.crashpad_handler_behavior != TriState::kDisabled) {
|
if (client_options.crashpad_handler_behavior != TriState::kDisabled) {
|
||||||
UUID client_id;
|
UUID client_id;
|
||||||
Settings* const settings = database_->GetSettings();
|
Settings* const settings = database_->GetSettings();
|
||||||
if (settings) {
|
if (settings && settings->GetClientID(&client_id)) {
|
||||||
// If GetSettings() or GetClientID() fails, something else will log a
|
process_snapshot.SetClientID(client_id);
|
||||||
// message and client_id will be left at its default value, all zeroes,
|
|
||||||
// which is appropriate.
|
|
||||||
settings->GetClientID(&client_id);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
process_snapshot.SetClientID(client_id);
|
|
||||||
process_snapshot.SetAnnotationsSimpleMap(*process_annotations_);
|
process_snapshot.SetAnnotationsSimpleMap(*process_annotations_);
|
||||||
|
|
||||||
std::unique_ptr<CrashReportDatabase::NewReport> new_report;
|
std::unique_ptr<CrashReportDatabase::NewReport> new_report;
|
||||||
|
@ -36,6 +36,7 @@ bool ProcessSnapshotFuchsia::Initialize(const zx::process& process) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
client_id_.InitializeToZero();
|
||||||
system_.Initialize(&snapshot_time_);
|
system_.Initialize(&snapshot_time_);
|
||||||
|
|
||||||
InitializeThreads();
|
InitializeThreads();
|
||||||
|
@ -39,6 +39,7 @@ bool ProcessSnapshotLinux::Initialize(PtraceConnection* connection) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
client_id_.InitializeToZero();
|
||||||
system_.Initialize(&process_reader_, &snapshot_time_);
|
system_.Initialize(&process_reader_, &snapshot_time_);
|
||||||
|
|
||||||
GetCrashpadOptionsInternal((&options_));
|
GetCrashpadOptionsInternal((&options_));
|
||||||
|
@ -50,6 +50,7 @@ bool ProcessSnapshotMac::Initialize(task_t task) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
client_id_.InitializeToZero();
|
||||||
system_.Initialize(&process_reader_, &snapshot_time_);
|
system_.Initialize(&process_reader_, &snapshot_time_);
|
||||||
|
|
||||||
InitializeThreads();
|
InitializeThreads();
|
||||||
|
@ -81,7 +81,7 @@ bool ProcessSnapshotWin::Initialize(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
client_id_.InitializeToZero();
|
||||||
system_.Initialize(&process_reader_);
|
system_.Initialize(&process_reader_);
|
||||||
|
|
||||||
if (process_reader_.Is64Bit()) {
|
if (process_reader_.Is64Bit()) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user