mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-10 05:47:04 +00:00
Bug 886156 - Part 1: belt-and-braces safety in initialization of ProfileInformationCache. r=nalexander
This commit is contained in:
parent
ed8cee1639
commit
ccf78e8bcd
@ -564,7 +564,7 @@ public class BrowserHealthRecorder implements GeckoEventListener {
|
||||
PREF_BLOCKLIST_ENABLED
|
||||
},
|
||||
handler);
|
||||
Log.d(LOG_TAG, "Done initializing profile cache. Beginning storage init.");
|
||||
Log.d(LOG_TAG, "Requested prefs.");
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -574,7 +574,7 @@ public class BrowserHealthRecorder implements GeckoEventListener {
|
||||
Log.d(LOG_TAG, "Got all add-ons.");
|
||||
try {
|
||||
JSONObject addons = message.getJSONObject("json");
|
||||
Log.d(LOG_TAG, "Persisting " + addons.length() + " add-ons.");
|
||||
Log.i(LOG_TAG, "Persisting " + addons.length() + " add-ons.");
|
||||
profileCache.setJSONForAddons(addons);
|
||||
profileCache.completeInitialization();
|
||||
} catch (java.io.IOException e) {
|
||||
|
@ -5238,11 +5238,15 @@ let HealthReportStatusListener = {
|
||||
if (aAddons) {
|
||||
for (let i = 0; i < aAddons.length; ++i) {
|
||||
let addon = aAddons[i];
|
||||
let addonJSON = HealthReportStatusListener.jsonForAddon(addon);
|
||||
if (HealthReportStatusListener._shouldIgnore(addon)) {
|
||||
addonJSON.ignore = true;
|
||||
try {
|
||||
let addonJSON = HealthReportStatusListener.jsonForAddon(addon);
|
||||
if (HealthReportStatusListener._shouldIgnore(addon)) {
|
||||
addonJSON.ignore = true;
|
||||
}
|
||||
json[addon.id] = addonJSON;
|
||||
} catch (e) {
|
||||
// Just skip this add-on.
|
||||
}
|
||||
json[addon.id] = addonJSON;
|
||||
}
|
||||
}
|
||||
sendMessageToJava({ type: "Addons:All", json: json });
|
||||
|
Loading…
Reference in New Issue
Block a user