Closed Bug 834541 Opened 11 years ago Closed 5 years ago

remove hasHistoryEntries


(Toolkit :: Places, defect, P3)




Tracking Status
firefox62 --- fixed


(Reporter: mak, Assigned: mak)



(Whiteboard: [fxsearch])


(1 file)

hasHistoryEntries is cached most of the time, though sometimes we have to requery, and that query is synchronous.
Blocks: 806617
Whiteboard: p=0
No longer blocks: fxdesktopbacklog
Flags: firefox-backlog+
Whiteboard: p=0 → p=13 [qa?]
a couple instances in WindowsJumpLists.jsm could be easily converted to be async.
The one on shutdown could be converted using AsyncShutdown...

but actually, if we could completely remove the API, it would be even better.
WindowsJumpLists.jsm is the only _external_ consumer in our code, the instances in queries are there just as micro optimizations (don't even query if we know there's no history), we could just ignore those optimizations since they only help someone that doesn't have any history (very small minority of users).
The check on shutdown is basically a "did we run clear history on shutdown?" question, and we can figure a better way to reply that question that doesn't involve disk access or even knowing if there's history (it could listen to a clear on shutdown topic or directly to history, unfortunately "shutdown-cleanse" has gone).
Points: --- → 5
Flags: qe-verify-
Whiteboard: p=13 [qa?]
Depends on: 1101478
Summary: make hasHistoryEntries asynchronous → make hasHistoryEntries asynchronous and deprecate it
Summary: make hasHistoryEntries asynchronous and deprecate it → remove hasHistoryEntries
Depends on: 1103938
Priority: -- → P2
Priority: P2 → P3
Assignee: nobody → mak77
Whiteboard: [fxsearch]
Comment on attachment 8973949 [details]
Bug 834541 - Remove the public History.hasHistoryEntries synchronous API.
Attachment #8973949 - Flags: review?(standard8) → 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 8f16311fb00e415258833ff313a9982bf5e32c4b -d 2d5c99b70e34: rebasing 462825:8f16311fb00e "Bug 834541 - Remove the public History.hasHistoryEntries synchronous API. r=standard8" (tip)
merging toolkit/components/places/nsNavHistory.cpp
merging toolkit/components/places/nsNavHistory.h
merging toolkit/components/places/nsNavHistoryResult.cpp
merging toolkit/components/places/tests/unit/test_browserhistory.js
warning: conflicts while merging toolkit/components/places/nsNavHistory.h! (edit, then use 'hg resolve --mark')
warning: conflicts while merging toolkit/components/places/tests/unit/test_browserhistory.js! (edit, then use 'hg resolve --mark')
unresolved conflicts (see hg resolve, then hg rebase --continue)
Pushed by
Remove the public History.hasHistoryEntries synchronous API. r=standard8
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla62
You need to log in before you can comment on or make changes to this bug.