Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

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,