Closed Bug 739221 Opened 13 years ago Closed 13 years ago

Remove nsIBrowserHistory::count

Categories

(Toolkit :: Places, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla15

People

(Reporter: mak, Assigned: marco)

References

Details

(Keywords: addon-compat, dev-doc-complete)

Attachments

(1 file, 1 obsolete file)

.count is basically a duplicate of .hasHistoryEntries, it has never reported the actual count. We don't need two attributes providing the same information.
Attached patch Patch (obsolete) (deleted) — Splinter Review
Attachment #620451 - Flags: review?(mak77)
Comment on attachment 620451 [details] [diff] [review] Patch Review of attachment 620451 [details] [diff] [review]: ----------------------------------------------------------------- You should also fix call points, replacing PlacesUtils.bhistory.count with PlacesUtils.history.hasHistoryEntries. This is what I found so far: http://mxr.mozilla.org/mozilla-central/search?string=bhistory.count Unfortunately sessionhistory has also a .count and is almost always called just history, so searching just for history.count generates lots of false positives due to sessionHistory. I also tried to search for most common entries like browserHistory.count, browser_history.count, bh.count, hist.count and I couldn't find any use in add-ons mxr, so looks like there shouldn't be much trouble in the removal. Once these are fixed will be worth to make a tryrun to check for eventual other call points.
Attachment #620451 - Flags: review?(mak77)
Assignee: nobody → mar.castelluccio
Status: NEW → ASSIGNED
Attached patch Patch v2 (deleted) — Splinter Review
Attachment #620451 - Attachment is obsolete: true
Keywords: addon-compat
I think we can land it now, as the failures seems unrelated. Do you agree?
Comment on attachment 620776 [details] [diff] [review] Patch v2 Review of attachment 620776 [details] [diff] [review]: ----------------------------------------------------------------- yep, though this needs SR cause of the idl change.
Attachment #620776 - Flags: superreview?(gavin.sharp)
Attachment #620776 - Flags: review+
Comment on attachment 620776 [details] [diff] [review] Patch v2 Any idea what the potential add-on impact will be? It looks like we had no in-tree callers (outside of tests), so I imagine it should be minimal?
Attachment #620776 - Flags: superreview?(gavin.sharp) → superreview+
(In reply to :Gavin Sharp (use gavin@gavinsharp.com for email) from comment #6) > Comment on attachment 620776 [details] [diff] [review] > Patch v2 > > Any idea what the potential add-on impact will be? It looks like we had no > in-tree callers (outside of tests), so I imagine it should be minimal? I didn't find any caller in addons mxr, though as I said in comment 2 it's hard to search cause sessionhistory is often called history, and there are many history.count (I checked most of those and were all about sessionhistory).
Keywords: dev-doc-needed
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: