Hi,
        I try to allocate memory in my XPCOM component as follow:

        PRUnichar* ptrPRUnichar = reinterpret_cast<PRUnichar*> 
(nsMemory::Alloc(20)) ;

The result address of " ptrPRUnichar " is NULL. I don't understand,  
what is wrong.

Best Regards,   
Pierre



> De : Pierre Doyon <[EMAIL PROTECTED]>
> Date : 12 juillet 2007 14:33:36 HAE
> À : dev-tech-xpcom@lists.mozilla.org
> Objet : port XPCOM package from WINDOWS to MAC
>
>   Hi, 
>
>   I’m trying to port a XPCOM package from WIN to Mac OS X. The
> package contain a XPCOM component. To generate the package on Mac OS
> X, I did the following step :
>
>   1) I download Mozilla Source code from CVS.
>
> cvs -d :pserver:[EMAIL PROTECTED]:/cvsroot co mozilla/
> client.mk
>
> cd mozilla
>
> cp
>
> ./configure (with the mozconfig file locate in the “ browser->config
> “ folder )
>
> 2) I built Firefox with gcc-4.0 on Mac OS X 10.4.8 (PowerPC).
>
> 3) I built my XPCOM component with some libraries and sources files
> generate in the step 1 (libnspr4.a, libplc4.a, libplds4.a,
> libxpcomglue_s.a, libxpcomglues.a).
>
>
>
> I install the XPCOM package in Firefox 2.0.0.4. The installation of
> the package seems ok, but there is some problems with my custom XPCOM
> component. My component have to access to the text of the selection
> and the problem happen when I try to get the nod value of a
> nsIDOMText instance (nsIDOMText::GetNodeValue). I think that the
> problem come from the nsEmbedString class. The crash log look like :
>
> Thread 0 Crashed:
>
> 0   libxpcom_core.dylib                 0x2c06a3e4
> nsAString_internal::SetLength(unsigned) + 44
>
> 1   libxpcom_core.dylib                 0x2c06097c CopyASCIItoUTF16
> (nsACString_internal const&, nsAString_internal&) + 36
>
> 2   org.mozilla.firefox                 0x007993f0
> nsGenericDOMDataNode::GetData(nsAString_internal&) + 112
>
>
>
> I’ll appreciate, if someone can give me some hints
>
>   Best Regards, Pierre
>
>
>
>
>
>
> _______________________________________________
> dev-tech-xpcom mailing list
> dev-tech-xpcom@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-tech-xpcom
>

_______________________________________________
dev-tech-xpcom mailing list
dev-tech-xpcom@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-tech-xpcom

Reply via email to