Remove support for nsIMsgStringService

RESOLVED FIXED

Status

Thunderbird
General
RESOLVED FIXED
11 years ago
11 years ago

People

(Reporter: Scott MacGregor, Assigned: Scott MacGregor)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Assignee)

Description

11 years ago
Instead of updating this interface, we should just get rid of it and go through the string bundle service directly. I think we invented this service back in the day when string bundles weren't being cached. Most of the mailnews code already uses string bundles directly but some code in local and compose go through this intermediary service.
(Assignee)

Comment 1

11 years ago
Created attachment 266138 [details] [diff] [review]
the fix

This patch removes nsIMsgStringService.

mailnews\local was easy to fix, just use the nsIStringBundleService directly.

compose is a mess unfortunately. We use string IDs as both string IDs and error codes that get passed around. This made the transition to using the string bundles directly much harder because sometimes we have to unwrap the 'error' code portion of the ID before calling GetStringFromID. I've tried to improve this a little bit by removing the error code wrapping around all the string IDs that are only used as string IDs. And only methods that can receive error codes try to unwrap the err part of the string ID before calling GetSTringFromID. 

It would still be useful to have someone finish cleaning this up by ending the practice of using the same ID as an error code and a string ID. I'll file a separate bug in case someone wants to tackle that.

Updated

11 years ago
OS: Windows Vista → All
Hardware: PC → All
Version: 2.0 → Trunk
(Assignee)

Comment 2

11 years ago
Comment on attachment 266138 [details] [diff] [review]
the fix

I forgot to ask for a review on this :)
Attachment #266138 - Flags: superreview?(bienvenu)

Comment 3

11 years ago
Comment on attachment 266138 [details] [diff] [review]
the fix

is there any js that tries to use these removed classes?
Attachment #266138 - Flags: superreview?(bienvenu) → superreview+
(Assignee)

Comment 4

11 years ago
Created attachment 267101 [details] [diff] [review]
unbit rot the patch
(Assignee)

Comment 5

11 years ago
Checked in, let's hope I didn't mess up any of the compose error & string ID abuse.
Status: NEW → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → FIXED

Comment 6

11 years ago
This caused a regression, see bug 385220.
Depends on: 385220
You need to log in before you can comment on or make changes to this bug.