Closed
Bug 1351915
Opened 7 years ago
Closed 7 years ago
`dedupeSyncBookmark` should fire `onItemChanged` when an item's GUID changes
Categories
(Firefox :: Sync, enhancement, P2)
Firefox
Sync
Tracking
()
RESOLVED
FIXED
Firefox 55
Tracking | Status | |
---|---|---|
firefox55 | --- | fixed |
People
(Reporter: lina, Assigned: eoger)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
`dedupeSyncBookmark` updates the GUID in the database, and calls `invalidateCachedGuidFor`, but doesn't fire `onItemChanged`. This means consumers that cache GUIDs (Web Extensions, for example, via the `chrome.bookmarks` API) might be working with stale ones.
Comment 1•7 years ago
|
||
Talking specifically about browser.bookmarks: Note that the WE API is… optimistic in this regard. "Each ID is unique within the user's profile and remains unchanged across browser restarts." and the WE onChanged event is only defined for titles and URLs: > Fired when there is a change to: > > - the title or URL of a bookmark > - the name of a folder. I'm not sure if this is just our docs or if that restriction is in the spec.
Reporter | ||
Updated•7 years ago
|
Priority: -- → P2
Reporter | ||
Updated•7 years ago
|
Assignee: nobody → eoger
Comment hidden (mozreview-request) |
Reporter | ||
Comment 3•7 years ago
|
||
mozreview-review |
Comment on attachment 8858931 [details] Bug 1351915 - Fire onItemChanged when deduping sync bookmarks. https://reviewboard.mozilla.org/r/130926/#review133514 Looks great, thanks! ::: toolkit/components/places/PlacesSyncUtils.jsm:1776 (Diff revision 1) > > var dedupeSyncBookmark = Task.async(function* (db, localGuid, remoteGuid, > remoteParentGuid) { > + let bookmarkItem = yield PlacesUtils.bookmarks.fetch(localGuid); > let rows = yield db.executeCached(` > - SELECT b.id, p.guid AS parentGuid, b.syncStatus > + SELECT b.id, p.id AS parentId, p.guid AS parentGuid, b.syncStatus Might as well add `b.type` to the query, too, and remove the `fetch()` call.
Attachment #8858931 -
Flags: review?(kit) → review+
Comment hidden (mozreview-request) |
Assignee | ||
Comment 5•7 years ago
|
||
Thanks!
Pushed by eoger@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1eceb91e9437 Fire onItemChanged when deduping sync bookmarks. r=kitcambridge
Comment 7•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/1eceb91e9437
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox55:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 55
You need to log in
before you can comment on or make changes to this bug.
Description
•