Closed Bug 950333 Opened 11 years ago Closed 11 years ago

external api builds broken by bug 842632

Categories

(MailNews Core :: MIME, defect)

All
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 29.0

People

(Reporter: mkmelin, Assigned: mkmelin)

References

Details

(Keywords: regression, Whiteboard: [external-api-bustage] )

Attachments

(1 file)

Attached patch proposed fixSplinter Review
Bug 842632 broke the external api builds.
With the attached patch it builds with both apis. Don't know if there are better ways to fix it.

/opt/comm-central/src/mailnews/mime/src/MimeHeaderParser.cpp: In function ‘mozilla::mailnews::ParsedHeader mozilla::mailnews::DecodedHeader(const nsAString&)’:
/opt/comm-central/src/mailnews/mime/src/MimeHeaderParser.cpp:92:64: error: ‘NS_FREE_XPCOM_ALLOCATED_POINTER_ARRAY’ was not declared in this scope
/opt/comm-central/src/mailnews/mime/src/MimeHeaderParser.cpp: In destructor ‘mozilla::mailnews::ParsedHeader::~ParsedHeader()’:
/opt/comm-central/src/mailnews/mime/src/MimeHeaderParser.cpp:134:61: error: ‘NS_FREE_XPCOM_ISUPPORTS_POINTER_ARRAY’ was not declared in this scope
make[9]: *** [MimeHeaderParser.o] Error 1


/opt/comm-central/src/mailnews/mime/src/nsMsgHeaderParser.cpp: In member function ‘virtual nsresult MsgAddressObject::ToString(nsAString&)’:
/opt/comm-central/src/mailnews/mime/src/nsMsgHeaderParser.cpp:1584:26: error: no matching function for call to ‘getter_Copies(nsAString&)’
/opt/comm-central/src/mailnews/mime/src/nsMsgHeaderParser.cpp:1584:26: note: candidates are:
../../../mozilla/dist/include/nsStringAPI.h:1154:1: note: nsGetterCopies_external getter_Copies(nsString_external&)
../../../mozilla/dist/include/nsStringAPI.h:1154:1: note:   no known conversion for argument 1 from ‘nsAString’ to ‘nsString_external&’
../../../mozilla/dist/include/nsStringAPI.h:1184:1: note: nsCGetterCopies_external getter_Copies(nsCString_external&)
../../../mozilla/dist/include/nsStringAPI.h:1184:1: note:   no known conversion for argument 1 from ‘nsAString’ to ‘nsCString_external&’
/opt/comm-central/src/mailnews/mime/src/nsMsgHeaderParser.cpp: In function ‘MsgAddressObject* MakeSingleAddress(const nsAString&)’:
/opt/comm-central/src/mailnews/mime/src/nsMsgHeaderParser.cpp:1604:32: error: invalid initialization of reference of type ‘nsCString_external&’ from expression of type ‘nsString_external’
../../../mozilla/dist/include/nsMsgUtils.h:427:18: error: in passing argument 1 of ‘void MsgCompressWhitespace(nsCString_external&)’
Attachment #8347606 - Flags: review?(Pidgeot18)
Keywords: regression
Comment on attachment 8347606 [details] [diff] [review]
proposed fix

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

I'm assuming this actually compiles on external API.

::: mailnews/mime/src/nsMsgHeaderParser.cpp
@@ +31,5 @@
>  #define NEXT_CHAR(_STR)             (_STR = NextChar_UTF8((char *)_STR))
>  #define TRIM_WHITESPACE(_S,_E,_T)   do { while (_E > _S && IS_SPACE(_E[-1])) _E--;\
>                                           *_E++ = _T; } while (0)
>  
> +#define kWhitespace " \t\b\r\n"

This whitespace string is most definitely wrong. It should be " \t\r\n" as far as MIME is concerned.
Attachment #8347606 - Flags: review?(Pidgeot18) → review+
(In reply to Joshua Cranmer from comment #1)
> > +#define kWhitespace " \t\b\r\n"
> 
> This whitespace string is most definitely wrong. It should be " \t\r\n" as
> far as MIME is concerned.

That's the string CompressWhitespace uses. (But for some reason MsgCompressWhitespace uses " \f\n\r\t\v" in external builds...)
If you're adding a string to a file called mime/src/nsMsgHeaderParser.cpp listing whitespace, you might as well limit it to what MIME considers whitespace. Granted, anyone trying to use \f or \b or anything else occasionally matched by \S is likely to be in a heap of pain...
So, I should change it to " \t\r\n" + a comment that this is what MIME considers whitespace?
https://hg.mozilla.org/comm-central/rev/c5be7d3cd610 -> FIXED
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 29.0
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: