Closed Bug 1432434 Opened 3 years ago Closed 2 years ago

Remove getItemDateAdded and setItemDateAdded

Categories

(Toolkit :: Places, enhancement, P1)

enhancement

Tracking

()

RESOLVED FIXED
mozilla60
Tracking Status
firefox60 --- fixed

People

(Reporter: mak, Assigned: mak)

References

(Blocks 1 open bug)

Details

(Whiteboard: [fxsearch])

Attachments

(1 file)

Some tests are using these and should be refactored
https://searchfox.org/mozilla-central/search?q=etItemDateAdded&path=
Assignee: nobody → mak77
Status: NEW → ASSIGNED
Priority: P2 → P1
Whiteboard: [fx-search] → [fxsearch]
Kit, I'm not sure about the changes to test_bookmark_tracker.js
In particular, the old setItemDateAdded was causing the item to be tracked, but in bookmarks.jsm we have this check
https://searchfox.org/mozilla-central/rev/a539f8f7fe288d0b4d8d6a32510be20f52bb7a0f/toolkit/components/places/Bookmarks.jsm#1311
that forces me to change another property in addition to dateAdded.
Also setting another property like "title" makes the test pass, with a doubled score.
Flags: needinfo?(kit)
The correct behavior is not to bump the counter if all we're changing is the date added, index, and last modified time. So `setItemDateAdded` is wrong, `update` is right.
Flags: needinfo?(kit)
Comment on attachment 8949584 [details]
Bug 1432434 - Remove Bookmarks::getItemDateAdded and setItemDateAdded.

https://reviewboard.mozilla.org/r/218960/#review224800

\o/
Attachment #8949584 - Flags: review?(kit) → review+
We're sorry, Autoland could not rebase your commits for you automatically. Please manually rebase your commits and try again.

hg error in cmd: hg rebase -s 013888ede2b1beeca5de9b9bf997791ab0c6daaa -d 63ff291a2433: rebasing 446611:013888ede2b1 "Bug 1432434 - Remove Bookmarks::getItemDateAdded and setItemDateAdded. r=kitcambridge" (tip)
merging toolkit/components/places/nsNavBookmarks.cpp
merging toolkit/components/places/nsNavBookmarks.h
warning: conflicts while merging toolkit/components/places/nsNavBookmarks.cpp! (edit, then use 'hg resolve --mark')
unresolved conflicts (see hg resolve, then hg rebase --continue)
Pushed by mak77@bonardo.net:
https://hg.mozilla.org/integration/autoland/rev/cd3701880815
Remove Bookmarks::getItemDateAdded and setItemDateAdded. r=kitcambridge
https://hg.mozilla.org/mozilla-central/rev/cd3701880815
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla60
You need to log in before you can comment on or make changes to this bug.