Only do Android-specific adjustments for Android minidumps.

Change-Id: I33b1f988766f79b473127c4b56b1c81021b89631
Reviewed-on: https://chromium-review.googlesource.com/1115436
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
diff --git a/src/google_breakpad/processor/minidump.h b/src/google_breakpad/processor/minidump.h
index 785428b..1ad513d 100644
--- a/src/google_breakpad/processor/minidump.h
+++ b/src/google_breakpad/processor/minidump.h
@@ -544,7 +544,8 @@
   bool StoreRange(const MinidumpModule& module,
                   uint64_t base_address,
                   uint32_t module_index,
-                  uint32_t module_count);
+                  uint32_t module_count,
+                  bool is_android);
 
   // The largest number of modules that will be read from a minidump.  The
   // default is 1024.
diff --git a/src/processor/minidump.cc b/src/processor/minidump.cc
index fa21f27..d630987 100644
--- a/src/processor/minidump.cc
+++ b/src/processor/minidump.cc
@@ -2725,8 +2725,10 @@
         return false;
       }
 
-      if (!StoreRange(module, base_address, module_index, module_count)) {
-        if (base_address >= last_end_address) {
+      const bool is_android = minidump_->IsAndroid();
+      if (!StoreRange(module, base_address, module_index, module_count,
+                      is_android)) {
+        if (!is_android || base_address >= last_end_address) {
           BPLOG(ERROR) << "MinidumpModuleList could not store module "
                        << module_index << "/" << module_count << ", "
                        << module.code_file() << ", " << HexString(base_address)
@@ -2737,6 +2739,7 @@
         // If failed due to apparent range overlap the cause may be the client
         // correction applied for Android packed relocations.  If this is the
         // case, back out the client correction and retry.
+        assert(is_android);
         module_size -= last_end_address - base_address;
         base_address = last_end_address;
         if (!range_map_->StoreRange(base_address, module_size, module_index)) {
@@ -2762,7 +2765,8 @@
 bool MinidumpModuleList::StoreRange(const MinidumpModule& module,
                                     uint64_t base_address,
                                     uint32_t module_index,
-                                    uint32_t module_count) {
+                                    uint32_t module_count,
+                                    bool is_android) {
   if (range_map_->StoreRange(base_address, module.size(), module_index))
     return true;
 
@@ -2770,7 +2774,7 @@
   // entries for JITted code, so ignore these.
   // TODO(wfh): Remove this code when Android is fixed.
   // See https://crbug.com/439531
-  if (IsDevAshmem(module.code_file())) {
+  if (is_android && IsDevAshmem(module.code_file())) {
     BPLOG(INFO) << "MinidumpModuleList ignoring overlapping module "
                 << module_index << "/" << module_count << ", "
                 << module.code_file() << ", " << HexString(base_address) << "+"