XPCOM Glue without mozalloc

Starting with XULRunner 2.0, the frozen linkage dependent glue (xpcomglue_s.lib on Windows, libxpcomglue_s.a on Linux and Mac) is dependent on the new infallible memory allocation routines (mozalloc).  Since these routines didn't exist prior to XULRunner 2.0, XPCOM components that link against the frozen linkage dependent glue will not be compatible with XULRunner applications prior to 2.0.

The solution is to link against xpcomglue_s_nomozalloc instead (xpcomglue_s_nomozalloc.lib on Windows, libxpcomglue_s_nomozalloc.a on Linux and Mac).  This library is new in XULRunner 2.0, and it's identical to xpcomglue_s, except that it's compiled without mozalloc.  Simply change all references to "xpcomglue_s" in your compiler and linker flags to "xpcomglue_s_nomozalloc".  Resulting XPCOM components will no longer have a dependency on mozalloc, and will thus be compatible with XULRunner applications prior to 2.0 as well.

Comment: You might also need to build your component with the MOZ_NO_MOZALLOC flag (-DMOZ_NO_MOZALLOC)

Document Tags and Contributors

 Contributors to this page: Sheppy, iosart, azitnay
 Last updated by: Sheppy,