[panorama] Support the LastUseTime property in PerFolderDatabase
Categories
(MailNews Core :: Database, task)
Tracking
(Not tracked)
People
(Reporter: babolivier, Assigned: babolivier)
References
(Blocks 1 open bug)
Details
Attachments
(1 external file)
Similar to the latter half of bug 2083747, we can probably get away with just reading and writing to a member of the class.
nsMsgDatabase seems to do something a bit more complicated; it sets a global gLastUseTime in a few cases (Commit, EnumerateMessages, ListAllKeys, EnumerateThreads, EnumerateMessagesWithFlag and in a few methods of the DB service (OpenFolderDB, FinishDBOpen and CreateNewDB)) but does so fairly inconsistently (e.g. it updates the global in EnumerateMessages but not in ReverseEnumerateMessages which does essentially the same thing), and only uses it to set the class's member when calling GetMsgHdrForKey (because it might get called a lot so we don't want to call PR_Now every time). Unless set by GetMsgHdrForKey, the global's value isn't used by the LastUseTime getter.
nsIMsgDatabase's lastUseTime attribute seems to be primarily used so that MsgDBCacheManager.sys.mjs can close older database connections, which doesn't really make sense in a Panorama world.
For now, maintaining a class member should be fine.
| Assignee | ||
Comment 1•12 days ago
|
||
Once again, something we'll likely get rid of in the future, but let's
just stub it for now to make things work.
I ended up changing my approach. The only consumer of the setter lives
in nsMsgLocalMailFolder::GetDatabaseWOReparse, but no consumer of the
getter exists outside of MsgDBCacheManager.sys.mjs. That latter bit is
irrelevant to Panorama because we give the cache manager an empty list
of DBs anyway, so we just need to stub out the setter. I've added a
comment so we don't come back to this thinking the getter needs to be
implemented.
Updated•12 days ago
|
| Assignee | ||
Updated•11 days ago
|
Pushed by kaie@kuix.de:
https://hg.mozilla.org/comm-central/rev/d0538b6588d6
Support nsIMsgDatabase::lastUseTime in Panorama. r=darktrojan,BenC
Description
•