mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-10 13:54:27 +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
|
PREF_BLOCKLIST_ENABLED
|
||||||
},
|
},
|
||||||
handler);
|
handler);
|
||||||
Log.d(LOG_TAG, "Done initializing profile cache. Beginning storage init.");
|
Log.d(LOG_TAG, "Requested prefs.");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -574,7 +574,7 @@ public class BrowserHealthRecorder implements GeckoEventListener {
|
|||||||
Log.d(LOG_TAG, "Got all add-ons.");
|
Log.d(LOG_TAG, "Got all add-ons.");
|
||||||
try {
|
try {
|
||||||
JSONObject addons = message.getJSONObject("json");
|
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.setJSONForAddons(addons);
|
||||||
profileCache.completeInitialization();
|
profileCache.completeInitialization();
|
||||||
} catch (java.io.IOException e) {
|
} catch (java.io.IOException e) {
|
||||||
|
@ -5238,11 +5238,15 @@ let HealthReportStatusListener = {
|
|||||||
if (aAddons) {
|
if (aAddons) {
|
||||||
for (let i = 0; i < aAddons.length; ++i) {
|
for (let i = 0; i < aAddons.length; ++i) {
|
||||||
let addon = aAddons[i];
|
let addon = aAddons[i];
|
||||||
let addonJSON = HealthReportStatusListener.jsonForAddon(addon);
|
try {
|
||||||
if (HealthReportStatusListener._shouldIgnore(addon)) {
|
let addonJSON = HealthReportStatusListener.jsonForAddon(addon);
|
||||||
addonJSON.ignore = true;
|
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 });
|
sendMessageToJava({ type: "Addons:All", json: json });
|
||||||
|
Loading…
Reference in New Issue
Block a user