Bug 886156 - Part 2: don't initialize PIC with null add-ons. r=nalexander

This commit is contained in:
Richard Newman 2013-06-25 22:34:43 -07:00
Родитель ccf78e8bcd
Коммит c8f898fb4f
1 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -77,7 +77,7 @@ public class ProfileInformationCache implements ProfileInformationProvider {
blocklistEnabled = object.getBoolean("blocklist");
telemetryEnabled = object.getBoolean("telemetry");
profileCreationTime = object.getLong("profileCreated");
addons = object.optJSONObject("addons");
addons = object.getJSONObject("addons");
return true;
default:
Logger.warn(LOG_TAG, "Unable to restore from version " + version + " PIC file: expecting " + FORMAT_VERSION);
@ -161,6 +161,7 @@ public class ProfileInformationCache implements ProfileInformationProvider {
} catch (FileNotFoundException e) {
return false;
} catch (JSONException e) {
Logger.warn(LOG_TAG, "Malformed ProfileInformationCache. Not restoring.");
return false;
}
}