getFolderFromUri is broken

RESOLVED FIXED in Thunderbird 65.0

Status

enhancement
RESOLVED FIXED
10 months ago
10 months ago

People

(Reporter: darktrojan, Assigned: darktrojan)

Tracking

unspecified
Thunderbird 65.0

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

https://searchfox.org/comm-central/source/mailnews/base/util/folderUtils.jsm#111

getFolderById isn't a member of nsIFolderLookupService. It hasn't really mattered since nothing uses it, but now I want to. Maybe I'll just make the service a member of MailServices.
Assignee: nobody → geoff
Status: NEW → ASSIGNED
Attachment #9019181 - Flags: review?(jorgk)
Comment on attachment 9019181 [details] [diff] [review]
1500826-folder-from-uri-1.diff

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

r+ wc (with comments, as the Calendar people say).

::: mailnews/base/util/MailServices.jsm
@@ +73,5 @@
>                                     "mozINewMailNotificationService");
> +
> +XPCOMUtils.defineLazyServiceGetter(MailServices, "folderLookup",
> +                                   "@mozilla.org/mail/folder-lookup;1",
> +                                   "nsIFolderLookupService");

Why add it in this patch? If it's a preparation for some use elsewhere, please add it in that bug. No need to add unused code here.

Or am I missing something?

::: mailnews/base/util/folderUtils.jsm
@@ -114,5 @@
> - * @param aUri  the rdf uri of the folder to return
> - */
> -function getFolderFromUri(aUri) {
> -  return Cc["@mozilla.org/mail/folder-lookup;1"].
> -         getService(Ci.nsIFolderLookupService).getFolderById(aUri);

OK, this is broken and gets removed. Fine.
Attachment #9019181 - Flags: review?(jorgk) → review+
Fair enough.
Attachment #9019181 - Attachment is obsolete: true
Attachment #9019239 - Flags: review+
Keywords: checkin-needed
Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/95f2852bdd11
Remove broken folderUtils.getFolderFromUri. r=jorgk
Status: ASSIGNED → RESOLVED
Closed: 10 months ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 65.0
You need to log in before you can comment on or make changes to this bug.