Clear History - Clear now gives: Error sanitizing history: TypeError: PlacesUtils.history.removeVisitsByTimeframe is not a function
Categories
(Thunderbird :: Preferences, defect)
Tracking
(thunderbird68 fixed, thunderbird69 fixed)
People
(Reporter: jorgk-bmo, Assigned: benjamin)
Details
(Keywords: regression)
Attachments
(1 file, 3 obsolete files)
1.01 KB,
patch
|
jorgk-bmo
:
review+
jorgk-bmo
:
approval-comm-beta+
|
Details | Diff | Splinter Review |
I can't see in a hurry were this was removed. Looks like it was in nsIBrowserHistory.idl:
https://dxr.mozilla.org/mozilla-esr60/source/toolkit/components/places/nsIBrowserHistory.idl#46
Mark and Marco, can you please give us a tip.
Comment 1•6 years ago
|
||
That would be bug 1089691 where they were removed and replaced by the new async history API.
Comment 2•6 years ago
|
||
You can now use methods exposed by History.jsm, accessible through PlacesUtils.history. In the removeVisitsByTimeframe case you can now use PlacesUtils.history.removeVisitsByFilter (to remove visits) or PlacesUtils.history.removeByFilter (to remove whole pages will all of their visits)
Reporter | ||
Comment 3•6 years ago
|
||
Thanks, Mark & Marco, that will give us a good start.
Updated•6 years ago
|
Updated•5 years ago
|
Reporter | ||
Comment 4•5 years ago
|
||
Oops, that one fell through the cracks.
Assignee | ||
Comment 5•5 years ago
|
||
Replaced ...removeVisitsByTimeFrame with ...removeVisitsByFilter, and set the filter keywords to match the desired effect.
Tested the build and there was no errors given when I cleared my history, and it seems to have removed the data properly though I had little data to remove.
Reporter | ||
Comment 6•5 years ago
|
||
Assignee | ||
Comment 7•5 years ago
•
|
||
I based the indentations on what I found in Fire Fox's code when it referenced the function.
and I'll try to remember to leave off the f+
Assignee | ||
Comment 8•5 years ago
|
||
Added [Author <email address>] to Commit section of patch, and reworded the title to match what the patch does.
Is she ready for check-in?
Reporter | ||
Comment 9•5 years ago
|
||
I'm attaching a corrected patch to avoid further iterations. There were a few issues:
- Never use tabs, ever. We use indentation of two spaces, apart from Calendar code which uses four. So clearly the indentation was wrong.
- In the HG header, you need to provide the user/author: #User Benjamin Flanagin <benjamin@thunderbird.net>
- In the commit message, try to say in one line what you did.
Reporter | ||
Updated•5 years ago
|
Reporter | ||
Updated•5 years ago
|
Reporter | ||
Comment 10•5 years ago
|
||
And you should also run the linter to check for linting issues.
Comment 11•5 years ago
|
||
Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/6e8451e1c4f9
Port bug 1089691: Use PlacesUtils.history.removeVisitsByFilter() when clearing history. r=jorgk
Reporter | ||
Updated•5 years ago
|
Reporter | ||
Comment 12•5 years ago
|
||
Description
•