Closed
Bug 234867
Opened 21 years ago
Closed 16 years ago
Rationalize nsIMsgHeaderParser.idl
Categories
(MailNews Core :: Backend, defect)
MailNews Core
Backend
Tracking
(Not tracked)
RESOLVED
FIXED
Thunderbird 3.0a3
People
(Reporter: neil, Assigned: neil)
Details
Attachments
(2 files, 2 obsolete files)
3.35 KB,
patch
|
Bienvenu
:
superreview+
|
Details | Diff | Splinter Review |
2.53 KB,
patch
|
Bienvenu
:
review+
|
Details | Diff | Splinter Review |
Bug 145798 got me thinking... a) why are many of the methods void with a single
out parameter b) why are the ones that are not scriptable, not scriptable c) why
are there scriptable wstring versions of some of the not scriptable methods.
The only method that I'm not interested in is parseHeaderAddresses because the
returned strings may contain nulls.
Assignee | ||
Comment 1•21 years ago
|
||
Assignee: sspitzer → neil.parkwaycc.co.uk
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•21 years ago
|
||
Attachment #141733 -
Attachment is obsolete: true
Assignee | ||
Updated•21 years ago
|
Attachment #141735 -
Flags: superreview?(bienvenu)
Attachment #141735 -
Flags: review?(jshin)
Comment 3•21 years ago
|
||
looks good, but need similar patch for tbird file mailCommands.js, abcommon.js
(there seem to be two instances of this file in the tbird tree - not sure if
either or both of them need to be changed as well)
Comment 4•21 years ago
|
||
(In reply to comment #0)
> Bug 145798 got me thinking... b) why are the ones that are not scriptable, not
> scriptable c) why are there scriptable wstring versions of some of the not
> scriptable methods.
It seems like non-scriptable versions were originally written to deal with
'char *' of an any chracter encoding ('charset' parameter is to indicate the
encoding). However, if you look at their implementations, it's assumed that by
the time we reach there, everything has to be in UTF-8 [1]. I get a lot of
assertions in xpcom/string (UTF-8 conversion routine) when I open a mail folder
with 'raw 8bit characters'. Mozilla moves along fine because static functions
actually dealing with header fields in nsMsgHeaderParser.cpp can deal with
non-UTF-8 8bit strings. Given this, I guess NS_ASSERTION(IsUTF8())'s have to be
replaced by NS_WARNING.
[1]
http://bonsai.mozilla.org/cvsview2.cgi?diff_mode=context&whitespace_mode=show&file=nsMsgHeaderParser.cpp&branch=&root=/cvsroot&subdir=mozilla/mailnews/mime/src&command=DIFF_FRAMESET&rev1=1.53&rev2=1.54
Assignee | ||
Comment 5•21 years ago
|
||
I didn't mean to look at the implementation... but that strikes me as odd, why
check for utf8ness if we pass an explicit character set?
Comment 6•21 years ago
|
||
Yeah, it's odd. I havent' done any code archaelogy. Perhaps, in the past,
'charset' parameter was used, but it's not used in any of implementations.
Anyway, unless we're sure that all 'string's are ASCII-only, we can't make
methods with 'string's cross the xpconnect boundary, can we? If they're always
UTF-8, we have to use AUTF8String, instead as you know well.
Assignee | ||
Comment 7•21 years ago
|
||
Ok, the rest of the file will have to wait for jshin's general string cleanup,
so for now I just want to change an out parameter to be a return value.
Attachment #141735 -
Attachment is obsolete: true
Assignee | ||
Comment 8•21 years ago
|
||
Comment on attachment 143227 [details] [diff] [review]
Simplified patch
David, do you want me to find separate review for this?
Attachment #143227 -
Flags: superreview?(bienvenu)
Comment 9•21 years ago
|
||
Comment on attachment 143227 [details] [diff] [review]
Simplified patch
r/sr=bienvenu
Attachment #143227 -
Flags: superreview?(bienvenu) → superreview+
Comment 10•21 years ago
|
||
Neil, is it OK to mark this Fixed? The current patch for bug 145798 relies
on this change.
Updated•20 years ago
|
Attachment #141735 -
Flags: superreview?(bienvenu)
Attachment #141735 -
Flags: review?(jshin)
Updated•20 years ago
|
Product: MailNews → Core
Updated•16 years ago
|
Product: Core → MailNews Core
Assignee | ||
Comment 12•16 years ago
|
||
Not making them scriptable this time, but just converting outparams to retvals.
Attachment #338848 -
Flags: review?(bienvenu)
Updated•16 years ago
|
Attachment #338848 -
Flags: review?(bienvenu) → review+
Assignee | ||
Comment 13•16 years ago
|
||
Pushed changeset e8ba2f193d98 to comm-central.
I'll resolve this bug now; anyone doing other cleanup can open another one.
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Updated•16 years ago
|
OS: Windows 2000 → All
Hardware: PC → All
Target Milestone: --- → Thunderbird 3.0a3
You need to log in
before you can comment on or make changes to this bug.
Description
•