Closed Bug 2083771 Opened 29 days ago Closed 9 days ago

[panorama] Implement GetFolder for PerFolderDatabase

Categories

(MailNews Core :: Database, task)

task
Points:
3

Tracking

(Not tracked)

RESOLVED FIXED
162 Branch

People

(Reporter: babolivier, Assigned: babolivier)

References

(Blocks 2 open bugs)

Details

Attachments

(1 external file)

One way of doing this would be to pass the nsIMsgFolder to the PerFolderDatabase constructor. It's not great (because ideally we'd do everything from just the folder's ID) but on the other hand PerFolderDatabase exists to contain nasty legacy design patterns.

Alternatively, we could make the nsIFolderLookupService able to lookup folders by database ID, but I'm not sure we want to expose database IDs to a non-database service.

(In reply to Brendan Abolivier [:babolivier] from comment #0)

Alternatively, we could make the nsIFolderLookupService able to lookup folders by database ID, but I'm not sure we want to expose database IDs to a non-database service.

Also, I really really want to kill nsIFolderLookupService entirely (Bug 1734254).

I think just passing the nsIMsgFolder to the PerFolderDatabase ctor is fine. Under Panorama the PerFolderDatabase object will be created by the folder when the folder is created, and lasts for the life time of the folder.

We don't have to do all the hoop-jumping we do at the moment where we destroy and recreate mork database objects all the time to try and avoid running out of filehandles. We probably don't even need nsMsgDBService at all.

Blocks: 2084114
Assignee: nobody → brendan
Status: NEW → ASSIGNED
Target Milestone: --- → 162 Branch

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/10f5ea48b429
Implement GetFolder for Panorama. r=BenC

Status: ASSIGNED → RESOLVED
Closed: 9 days ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: