Commit 58e2a895 authored by Scott Violet's avatar Scott Violet Committed by Commit Bot

weblayer: fix NPE in CrashReporterController

importMinidumpsCrashKeys may return null. The code was not
handling that.

BUG=1123207
TEST=none

Change-Id: Ibf775a9b053d8c051beb741e43daebc0d3c68fe5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2382876Reviewed-by: default avatarClark DuVall <cduvall@chromium.org>
Commit-Queue: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#803135}
parent 23bfe238
...@@ -204,6 +204,7 @@ public final class CrashReporterControllerImpl extends ICrashReporterController. ...@@ -204,6 +204,7 @@ public final class CrashReporterControllerImpl extends ICrashReporterController.
private String[] processNewMinidumpsOnBackgroundThread() { private String[] processNewMinidumpsOnBackgroundThread() {
Map<String, Map<String, String>> crashesInfoMap = Map<String, Map<String, String>> crashesInfoMap =
getCrashFileManager().importMinidumpsCrashKeys(); getCrashFileManager().importMinidumpsCrashKeys();
if (crashesInfoMap == null) return new String[0];
ArrayList<String> localIds = new ArrayList<>(crashesInfoMap.size()); ArrayList<String> localIds = new ArrayList<>(crashesInfoMap.size());
for (Map.Entry<String, Map<String, String>> entry : crashesInfoMap.entrySet()) { for (Map.Entry<String, Map<String, String>> entry : crashesInfoMap.entrySet()) {
JSONObject crashKeysJson = new JSONObject(entry.getValue()); JSONObject crashKeysJson = new JSONObject(entry.getValue());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment