Mozilla uses XPCOM technology to integrate components written in different languages.
XPCOM is a cross platform component object model, similar to
Microsoft COM. It has multiple language bindings, allowing XPCOM
components to be used and implemented in JavaScript, Java, and Python
in addition to C++. Interfaces in XPCOM are defined in a dialect of
IDL called XPIDL.
XPCOM itself provides a set of core components and classes, e.g. file
and memory management, threads, basic data structures (strings,
arrays, variants), etc. The majority of XPCOM components are not part
of this core set and are provided by other parts of the platform (e.g.
Gecko or Necko) or by an application or even by an extension.