Closed Bug 1527772 Opened 1 year ago Closed 5 months ago

Decouple folder creation from RDF

Categories

(MailNews Core :: Backend, defect)

defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 71.0

People

(Reporter: benc, Assigned: benc)

References

Details

Attachments

(1 file, 1 obsolete file)

Folders are currently constructed by looking up the correct nsIFactory and calling createInstance().

The factories all have the form"@mozilla.org/rdf/resource-factory;1?name=" + scheme, which kind of implies they're registered as part of the RDF system.
They need to be freed from any RDF entanglements.

Blocks: mail-killrdf
Depends on: 1527764

My patch(es) for Bug 1527764 will move the folder creation into the folder-lookup-service, so easiest to wait until that stuff lands before worrying about this one.

Assignee: nobody → benc

This patch builds on top of the two RDF-removal patches in Bug 1527764.
It just shuffles about some naming to get folder creation out of the RDF code.

Attachment #9055367 - Flags: review?(acelists)
Comment on attachment 9055367 [details] [diff] [review]
decouple-folder-creation-from-rdf-1.patch

Review of attachment 9055367 [details] [diff] [review]:
-----------------------------------------------------------------

Nice, thanks.

::: mailnews/base/src/folderLookupService.js
@@ +66,5 @@
>  
>      // Check that uri has an active scheme, in case this folder is from
>      // an extension that is currently disabled or hasn't started up yet.
>      let scheme = uri.match(/\w*/)[0];
> +    let contractID = "@mozilla.org/mail/folder-factory;1?name=" + scheme;

Declare it const while there.

::: mailnews/base/util/nsMsgDBFolder.h
@@ -8,5 @@
>  
>  #include "mozilla/Attributes.h"
>  #include "msgCore.h"
>  #include "nsIMsgFolder.h"
> -#include "nsRDFResource.h"

Great, last include ;)
Attachment #9055367 - Flags: review?(acelists) → review+
Version: unspecified → Trunk

So this is waiting for bug 1527764 which is waiting for bug 1534163 which is ready now, right? So how about rebasing everything as necessary and doing a final try run?

Rebased.
To apply on top of the two patches in Bug 1527764.

Attachment #9055367 - Attachment is obsolete: true
Attachment #9095067 - Flags: review+

Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/3970c1407633
Move folder-factory lookup out of RDF. r=aceman

Status: NEW → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 71.0
You need to log in before you can comment on or make changes to this bug.