Fix Mac after af3dc54f

CrashpadInfo not being initialized/propagated properly on Mac.

Change-Id: I5f33a16e4e18bb1b068e0d4aeb7f2032a6cb6278
Reviewed-on: https://chromium-review.googlesource.com/324500
Reviewed-by: Mark Mentovai <mark@chromium.org>
This commit is contained in:
Scott Graham 2016-01-28 12:24:51 -08:00
parent af3dc54f2a
commit 83247fda60
3 changed files with 11 additions and 2 deletions

View File

@ -64,6 +64,7 @@ void ModuleSnapshotMac::GetCrashpadOptions(CrashpadInfoClientOptions* options) {
if (!mach_o_image_reader_->GetCrashpadInfo(&crashpad_info)) {
options->crashpad_handler_behavior = TriState::kUnset;
options->system_crash_reporter_forwarding = TriState::kUnset;
options->gather_indirectly_referenced_memory = TriState::kUnset;
return;
}
@ -74,6 +75,10 @@ void ModuleSnapshotMac::GetCrashpadOptions(CrashpadInfoClientOptions* options) {
options->system_crash_reporter_forwarding =
CrashpadInfoClientOptions::TriStateFromCrashpadInfo(
crashpad_info.system_crash_reporter_forwarding);
options->gather_indirectly_referenced_memory =
CrashpadInfoClientOptions::TriStateFromCrashpadInfo(
crashpad_info.gather_indirectly_referenced_memory);
}
std::string ModuleSnapshotMac::Name() const {

View File

@ -112,7 +112,8 @@ void ProcessSnapshotMac::GetCrashpadOptions(
// If non-default values have been found for all options, the loop can end
// early.
if (local_options.crashpad_handler_behavior != TriState::kUnset &&
local_options.system_crash_reporter_forwarding != TriState::kUnset) {
local_options.system_crash_reporter_forwarding != TriState::kUnset &&
local_options.gather_indirectly_referenced_memory != TriState::kUnset) {
break;
}
}

View File

@ -32,7 +32,10 @@ PROCESS_TYPE_STRUCT_BEGIN(CrashpadInfo)
// TriState
PROCESS_TYPE_STRUCT_MEMBER(uint8_t, system_crash_reporter_forwarding)
PROCESS_TYPE_STRUCT_MEMBER(uint16_t, padding_0)
// TriState
PROCESS_TYPE_STRUCT_MEMBER(uint8_t, gather_indirectly_referenced_memory)
PROCESS_TYPE_STRUCT_MEMBER(uint8_t, padding_0)
// SimpleStringDictionary*
PROCESS_TYPE_STRUCT_MEMBER(Pointer, simple_annotations)