Closed
Bug 1302288
Opened 8 years ago
Closed 8 years ago
Move `BookmarksStore::createRecord` implementation into `PlacesSyncUtils`
Categories
(Firefox :: Sync, defect, P1)
Firefox
Sync
Tracking
()
RESOLVED
FIXED
Firefox 52
Tracking | Status | |
---|---|---|
firefox52 | --- | fixed |
People
(Reporter: lina, Assigned: lina)
References
Details
Attachments
(1 file)
`PlacesSyncUtils` could grow a `fetch` method that gives us an item with all the right properties set on it. This would remove _isLoadInSidebar, _getDescription, _getTags, another caller of GUIDForId, and idForGUID.
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → kcambridge
Priority: -- → P1
Comment hidden (mozreview-request) |
Assignee | ||
Comment 2•8 years ago
|
||
Comment on attachment 8792705 [details] Bug 1302288 - Implement `PlacesSyncUtils.bookmarks.fetch`. Good news: `idForGUID` and `GUIDForId` can go away, too. \o/ Bad news: We have a lot of tests that use them. http://searchfox.org/mozilla-central/search?q=(idForGUID%7CGUIDForId)&case=true®exp=true&path=services%2Fsync (╯°□°)╯︵ ┻━┻
Attachment #8792705 -
Flags: feedback?(markh)
Assignee | ||
Comment 3•8 years ago
|
||
mozreview-review |
Comment on attachment 8792705 [details] Bug 1302288 - Implement `PlacesSyncUtils.bookmarks.fetch`. https://reviewboard.mozilla.org/r/79620/#review78256 ::: services/sync/modules/engines/bookmarks.js:95 (Diff revision 1) > }, > > __proto__: CryptoWrapper.prototype, > _logName: "Sync.Record.PlacesItem", > + > + populateFromSyncBookmark(item) { I kind of like having a method that populates itself from a `PlacesSyncUtils` bookmark. Do you think it makes sense to go the other way, too (i.e., a `toSyncBookmark` method that returns an object we can pass to `PlacesSyncUtils.bookmarks.insert` or `PlacesSyncUtils.bookmarks.update`)? That would take care of the "reference to undefined property" warning you pointed out in bug 1295521, and the switches in `create`. Or is that going too far into abstraction kool-aid land?
Comment 4•8 years ago
|
||
mozreview-review |
Comment on attachment 8792705 [details] Bug 1302288 - Implement `PlacesSyncUtils.bookmarks.fetch`. https://reviewboard.mozilla.org/r/79620/#review78972
Attachment #8792705 -
Flags: review+
Comment 5•8 years ago
|
||
Comment on attachment 8792705 [details] Bug 1302288 - Implement `PlacesSyncUtils.bookmarks.fetch`. stoopid mozreview - this looks fine to me.
Attachment #8792705 -
Flags: review+
Attachment #8792705 -
Flags: feedback?(markh)
Attachment #8792705 -
Flags: feedback+
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Assignee | ||
Comment 8•8 years ago
|
||
Comment on attachment 8792705 [details] Bug 1302288 - Implement `PlacesSyncUtils.bookmarks.fetch`. MozReview didn't reset the flag, for some reason. Mark, could you take another look, please?
Attachment #8792705 -
Flags: review?(markh)
Comment 9•8 years ago
|
||
mozreview-review |
Comment on attachment 8792705 [details] Bug 1302288 - Implement `PlacesSyncUtils.bookmarks.fetch`. https://reviewboard.mozilla.org/r/79620/#review83974 Looks great! ::: toolkit/components/places/PlacesSyncUtils.jsm:1143 (Diff revision 3) > + let folder = null; > + let params = new URLSearchParams(bookmarkItem.url.pathname); > + let tagFolderId = +params.get("folder"); > + if (tagFolderId) { > + try { > + // Throws if the tag query points to a nonexistent folder. This seems more "unexpected" than the other empty catch handlers - do you think it is worth logging here?
Attachment #8792705 -
Flags: review?(markh) → review+
Comment hidden (mozreview-request) |
Assignee | ||
Comment 11•8 years ago
|
||
mozreview-review-reply |
Comment on attachment 8792705 [details] Bug 1302288 - Implement `PlacesSyncUtils.bookmarks.fetch`. https://reviewboard.mozilla.org/r/79620/#review83974 > This seems more "unexpected" than the other empty catch handlers - do you think it is worth logging here? Good call, done!
Comment 12•8 years ago
|
||
Pushed by kcambridge@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2ab327c2a30a Implement `PlacesSyncUtils.bookmarks.fetch`. r=markh
Comment 13•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/2ab327c2a30a
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox52:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 52
You need to log in
before you can comment on or make changes to this bug.
Description
•