Closed Bug 1090308 Opened 5 years ago Closed 5 years ago

Invalidate mDaysOfHistory when getObservers is invoked

Categories

(Toolkit :: Places, defect)

defect
Not set
Points:
3

Tracking

()

RESOLVED FIXED
mozilla36
Iteration:
36.3

People

(Reporter: mak, Assigned: mak)

References

Details

currently mDaysOfHistory is invalidated in various code points, among which notifications pass-through (notifyOnItemExpired...)

bug 1089332 wants to expose GetObservers() like we did with bookmarks, so that we can remove nsPIPlacesHistoryListenersNotifier and notify directly. For that we want a solution that allows to invalidate mDaysOfHistory in a more automatic way (we would not be able to do that from js).
Flags: qe-verify-
Flags: in-testsuite?
Flags: firefox-backlog+
Assignee: nobody → mak77
Status: NEW → ASSIGNED
Iteration: --- → 36.3
I tried the trigger solution but it's not good.
Since Sqlite supports only FOR EACH ROW triggers, for each addition/removal we'd have to run a function that enqueues a runnable... if one removes 1000 visits, that's not sustainable.

What I'm going to do instead is implementing bug 1089332 and invalidating the cache when getObservers is invoked.
As a bonus, I have a patch that removes our only hasHistoryEntries consumer from the tree, I made that when trying the triggers path, it's worth to keep it.
Summary: Invalidate mDaysOfHistory through a trigger → Invalidate mDaysOfHistory when getObservers is invoked
No longer blocks: 1089332
Depends on: 1089332
Depends on: 1101478
Due to bug 1097213, the patch for this bug slipped into bug 1089332, that's ok since they are dependent, though I'm reporting that just for clarity.
https://hg.mozilla.org/integration/fx-team/rev/44ebd54f1b9c
Flags: in-testsuite? → in-testsuite+
Target Milestone: --- → mozilla36
https://hg.mozilla.org/mozilla-central/rev/44ebd54f1b9c
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.