Closed Bug 1225809 Opened 9 years ago Closed 6 years ago

unpinning DataStore operation is unsafe

Categories

(Firefox OS Graveyard :: Gaia::Homescreen, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: mbdejong, Assigned: mbdejong)

References

Details

Attachments

(2 files)

The only place where the Homescreen apps writes to the places DataStore seems to be here: https://mxr.mozilla.org/gaia/source/apps/homescreen/js/pages.js#223

Other apps that have write permission to the places DataStore are System and (if enabled) Sync.

If either of those update the same record at the same time, this operation is not safe against race conditions (it does not check whether the DataStore revisionId changed between the `get` and the `put` operation).
Assignee: nobody → mbdejong
Blocks: 1208352
Blocks: 1221234
Comment on attachment 8690073 [details] [review]
[gaia] michielbdejong:1225809-unpinning > mozilla-b2g:master

Obsoleted by https://bugzilla.mozilla.org/attachment.cgi?id=8694175&action=edit
Attachment #8694175 - Flags: review?(chrislord.net)
Comment on attachment 8694175 [details] [review]
[gaia] michielbdejong:1225809-safer-unpinning-code > mozilla-b2g:master

Couple of nits/questions, but lgtm, thanks!
Attachment #8694175 - Flags: review?(chrislord.net) → review+
No longer blocks: 1221234
Firefox OS is not being worked on
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: