Closed
Bug 1215473
Opened 8 years ago
Closed 8 years ago
Avoid accessing private variable placesStore in history DataAdapter
Categories
(Firefox OS Graveyard :: Sync, defect, P3)
Tracking
(Not tracked)
RESOLVED
FIXED
FxOS-S11 (13Nov)
People
(Reporter: mbdejong, Assigned: mbdejong)
References
Details
(Whiteboard: [partner-cherry-pick])
Attachments
(1 file)
At this line [1] and also two lines below, `store` is not defined. [1] https://github.com/mozilla-b2g/gaia/blob/4d1ff2b17850c3ec3d9c6869b73e9a45e4338db4/apps/sync/js/adapters/bookmarks.js#L123
Comment 1•8 years ago
|
||
Assignee | ||
Updated•8 years ago
|
Attachment #8674818 -
Flags: feedback?(selee)
Assignee | ||
Comment 2•8 years ago
|
||
Needs a unit test, still.
Assignee | ||
Comment 3•8 years ago
|
||
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 4•8 years ago
|
||
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)
Updated•8 years ago
|
Blocks: TV_FxAccount
Comment 5•8 years ago
|
||
I am going to implement this in bug 1215086.
Assignee | ||
Comment 6•8 years ago
|
||
Great!
Assignee | ||
Updated•8 years ago
|
Assignee: mbdejong → selee
Assignee | ||
Updated•8 years ago
|
Attachment #8674818 -
Flags: review?(selee)
Comment 7•8 years ago
|
||
Comment on attachment 8674818 [details] [review] [gaia] michielbdejong:1215473-store-variable-in-scope > mozilla-b2g:master LGTM :)
Attachment #8674818 -
Flags: review?(selee) → review+
Updated•8 years ago
|
Updated•8 years ago
|
Assignee: selee → mbdejong
Assignee | ||
Updated•8 years ago
|
Priority: P1 → P2
Assignee | ||
Updated•8 years ago
|
Summary: 'store is not defined' error in history DataAdapter → Avoid accessing private variable placesStore in history DataAdapter
Assignee | ||
Comment 8•8 years ago
|
||
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)
Assignee | ||
Comment 9•8 years ago
|
||
Rebased.
Assignee | ||
Updated•8 years ago
|
Attachment #8674818 -
Flags: review+ → review?(ferjmoreno)
Updated•8 years ago
|
Attachment #8674818 -
Flags: review?(ferjmoreno) → review+
Comment 10•8 years ago
|
||
https://github.com/mozilla-b2g/gaia/commit/f8cc75ad7106f52d3835c4e697062fc6ed6c1dfa
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Updated•8 years ago
|
Whiteboard: [partner-cherry-pick]
You need to log in
before you can comment on or make changes to this bug.
Description
•