Closed Bug 1215473 Opened 4 years ago Closed 4 years ago

Avoid accessing private variable placesStore in history DataAdapter

Categories

(Firefox OS Graveyard :: Sync, defect, P3)

ARM
Gonk (Firefox OS)
defect

Tracking

(Not tracked)

RESOLVED FIXED
FxOS-S11 (13Nov)

People

(Reporter: mbdejong, Assigned: mbdejong)

References

Details

(Whiteboard: [partner-cherry-pick])

Attachments

(1 file)

Assignee: nobody → mbdejong
Blocks: 1195647
Attachment #8674818 - Flags: feedback?(selee)
Needs a unit test, still.
The reason this is currently working is that ensureStore uses a variable that's also called 'store'. We could leave this as it is, but I think it's cleaner to rename the private variable to _store, and force the rest of the code to always use the value provided ensureStore, instead of sometimes accessing the private variable directly.
Comment on attachment 8674818 [details] [review]
[gaia] michielbdejong:1215473-store-variable-in-scope > mozilla-b2g:master

Hello Michiel, I leave some comments at github. BTW, how do you think if keeping store as a local variable in addBookmark function?
Please f? or r? me again once you have any update. Thank you!
Attachment #8674818 - Flags: feedback?(selee)
I am going to implement this in bug 1215086.
Great!
Assignee: mbdejong → selee
Attachment #8674818 - Flags: review?(selee)
Comment on attachment 8674818 [details] [review]
[gaia] michielbdejong:1215473-store-variable-in-scope > mozilla-b2g:master

LGTM :)
Attachment #8674818 - Flags: review?(selee) → review+
Blocks: fxos-sync
Priority: -- → P1
Target Milestone: --- → FxOS-S10 (30Oct)
Assignee: selee → mbdejong
Priority: P1 → P2
Summary: 'store is not defined' error in history DataAdapter → Avoid accessing private variable placesStore in history DataAdapter
Marking this as P3 / Sprint 11 because it's code cleanup and doesn't affect functionality.
Priority: P2 → P3
Target Milestone: FxOS-S10 (30Oct) → FxOS-S11 (13Nov)
Rebased.
Attachment #8674818 - Flags: review+ → review?(ferjmoreno)
Attachment #8674818 - Flags: review?(ferjmoreno) → review+
https://github.com/mozilla-b2g/gaia/commit/f8cc75ad7106f52d3835c4e697062fc6ed6c1dfa
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Whiteboard: [partner-cherry-pick]
You need to log in before you can comment on or make changes to this bug.