Closed Bug 1528979 Opened 5 years ago Closed 5 years ago

Utils.hasLocalData() should return true even if local dump is an empty list

Categories

(Firefox :: Remote Settings Client, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 67
Tracking Status
firefox67 --- fixed

People

(Reporter: leplatrem, Assigned: leplatrem)

Details

Attachments

(1 file)

Currently, if you ship an empty dump ({"data":[]}), it will get loaded but Utils.hasLocalData() will continue to return false. Mainly because it looks for a local timestamp, and in this particular case none is saved.

It should return true, because we consider that if there is a local dump, then there is a local collection of data, even if it is empty :)

See
https://searchfox.org/mozilla-central/rev/05d4b6962a571585bd679d2bbb0df0a5fb4e4eff/services/settings/RemoteSettingsWorker.js#68-70

Assignee: nobody → mathieu

Fix loading of empty JSON dump

Storing an empty JSON dump should prevent .get() to initiate a sync.

Pushed by mleplatre@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/1e088259e033
Fix loading of empty JSON dump in Remote Settings r=glasserc
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 67
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: