Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(414)

Unified Diff: util/mac/process_reader.cc

Issue 651283003: Add crashpad_info, MachOImageAnnotationsReader, and its test (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Refactor to reduce deep nesting Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: util/mac/process_reader.cc
diff --git a/util/mac/process_reader.cc b/util/mac/process_reader.cc
index c142080b6bd32f741981fa379096de3a6788625b..b0a4c29058bccfba8715d83461910b16bf7c8cac 100644
--- a/util/mac/process_reader.cc
+++ b/util/mac/process_reader.cc
@@ -400,13 +400,14 @@ void ProcessReader::InitializeModules() {
//
// TODO(mark): It may be possible to recover from these situations by looking
// through memory mappings for Mach-O images.
+ //
+ // Continue along when this situation is detected, because even without any
+ // images in infoArray, dyldImageLoadAddress may be set, and it may be
+ // possible to recover some information from dyld.
if (all_image_infos.infoArrayCount == 0) {
LOG(WARNING) << "all_image_infos.infoArrayCount is zero";
- return;
- }
- if (!all_image_infos.infoArray) {
+ } else if (!all_image_infos.infoArray) {
LOG(WARNING) << "all_image_infos.infoArray is nullptr";
- return;
}
std::vector<process_types::dyld_image_info> image_info_vector(

Powered by Google App Engine
This is Rietveld 408576698