Srinivasa Raghavan wrote:
Hi BDS,

First of all thanks for your answer.

Below is the libraries i am linking against with MOZILLA_INTERNAL_API defined,
xpcom
xpcom_core
plds4
plc4
nspr4

This looks correct... did you get a stack trace for your crash?

--BDS

P.S. You don't need to send me private mail when you reply on the newsgroups.

Benjamin Smedberg wrote:

Srinivasa Raghavan wrote:

Hi All,

I am developing a XPCOM component which will be embedded to firefox.
Mainly I used nsString in my code and the functions I used are AppendWithConversion , AssignWithConversion ..etc. As there is more changes with respect to string in recent Firefox (Firefox 1.5) I need to change my implementation. As I used other Unfrozen interfaces apart from string in my code, which uses internal nsString classes, I need to define MOZILLA_INTERNAL_API.


That's not necessarily true. If you're only using nonfrozen *interfaces* you don't need to define MOZILLA_INTERNAL_API... that define only affects *symbol linkage*.

For what it's worth, it is almost never right to use the *WithConversion methods: they hardly ever handle character sets correctly. If you're converting from UTF8 to UTF16 use NS_ConvertUTF8toUTF16 and vice-versa.

I tried string manipulation in a sample component with MOZILLA_INTERNAL_API defined. I just declared nsString in a function, which causes firefox crash at runtime.
Can anybody clear me why this crash happens ?


What libs are you linking against?

--BDS

_______________________________________________
Mozilla-xpcom mailing list
Mozilla-xpcom@mozilla.org
http://mail.mozilla.org/listinfo/mozilla-xpcom

Reply via email to