mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 06:11:37 +00:00
Bug 1205833 - Don't log an error if we did not store any datareporting policy notify date yet. r=dexter
This commit is contained in:
parent
d536f8c730
commit
671c019482
@ -184,16 +184,17 @@ var TelemetryReportingPolicyImpl = {
|
||||
* @return {Object} A date object or null on errors.
|
||||
*/
|
||||
get dataSubmissionPolicyNotifiedDate() {
|
||||
if (!Preferences.has(PREF_ACCEPTED_POLICY_DATE)) {
|
||||
let prefString = Preferences.get(PREF_ACCEPTED_POLICY_DATE, "0");
|
||||
let valueInteger = parseInt(prefString, 10);
|
||||
|
||||
// Bail out if we didn't store any value yet.
|
||||
if (valueInteger == 0) {
|
||||
this._log.info("get dataSubmissionPolicyNotifiedDate - No date stored yet.");
|
||||
return null;
|
||||
}
|
||||
|
||||
let prefString = Preferences.get(PREF_ACCEPTED_POLICY_DATE, 0);
|
||||
let valueInteger = parseInt(prefString, 10);
|
||||
|
||||
// If nothing or an invalid value is saved in the prefs, bail out.
|
||||
if (Number.isNaN(valueInteger) || valueInteger == 0) {
|
||||
// If an invalid value is saved in the prefs, bail out too.
|
||||
if (Number.isNaN(valueInteger)) {
|
||||
this._log.error("get dataSubmissionPolicyNotifiedDate - Invalid date stored.");
|
||||
return null;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user