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.

Revision 1119261 of XPCOM

  • Revision slug: Mozilla/Tech/XPCOM
  • Revision title: XPCOM
  • Revision id: 1119261
  • Created:
  • Creator: Sheppy
  • Is current revision? No
  • Comment

Revision Content

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.

Use of the XPCOM API in add-ons (including extensions) is deprecated and support for add-ons using this API will be removed entirely from Firefox sometime in 2017. If you are an add-on developer, you need to begin migrating your add-on to use the WebExtensions APIs. To learn more about this transition, see Comparison with XUL/XPCOM extensions. In addition, any binaries you use should either be converted for use with the WebExtensions native messaging API, or compiled using WebAssembly or Emscripten. If you discover that functionality you need is not available, please report the issue to the developers.

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.

{{LandingPageListSubpages}}

{{CommunityBox("XPCOM", "dev-tech-xpcom", "mozilla.dev.tech.xpcom", "developers", "Tools|https://ted.mielczarek.org/code/mozilla/jscomponentwiz/|JavaScript Component Wizard++https://www.mytools360.com-a.googlepages.com/home#XPComPro|Visual C++ Component Wizard++https://www.yutools.com/wp/tools/yuxpcomwizard/?lang=en|Visual C++ Component Wizard for Visual Studio 2010++https://addons.mozilla.org/en-US/firefox/addon/xpcomviewer/|XPCOMViewer addon: browse XPCOM interfaces easily")}}

{{MakeSimpleQuicklinks("https://www.ibm.com/developerworks/library/os-xpcomfirefox/|Tutorial from IBM DeveloperWorks", "https://developer.mozilla.org/en-US/docs/Creating_Custom_Firefox_Extensions_with_the_Mozilla_Build_System|Binary components tutorial", "https://www.iosart.com/firefox/xpcom/|Linux and Windows how-to guide", "https://starkravingfinkle.org/blog/2006/10/mozilla-platform-xpcom-in-c/|Windows example blog post", "https://wanderingstan.com/2007-11-16/geekout_how_to_make_a_c_xpcom_component|Another Windows example", "https://rcrowley.org/2007/07/17/cross-platform-xpcom-a-howto.html|Mac OS X example", "/en-US/docs/Web/JavaScript")}}

Revision Source

<p><span class="seoSummary"><strong>XPCOM</strong> is a cross platform component object model, similar to Microsoft COM. It has multiple <a href="/en-US/docs/XPCOM/Language_Bindings" title="XPCOM/Language_Bindings">language bindings</a>, allowing XPCOM components to be used and implemented in JavaScript, Java, and Python in addition to C++.</span> Interfaces in XPCOM are defined in a dialect of IDL called <a href="/en-US/docs/XPIDL" title="XPIDL">XPIDL</a>.</p>

<div class="warning">
<p><strong>Use of the XPCOM API in add-ons</strong> (including extensions) is <strong>deprecated</strong> and support for add-ons using this API will be removed entirely from Firefox sometime in 2017. If you are an add-on developer, you need to begin migrating your add-on to use the WebExtensions APIs. To learn more about this transition, see <a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Comparison_with_XUL_XPCOM_extensions">Comparison with XUL/XPCOM extensions</a>. In addition, any binaries you use should either be converted for use with the WebExtensions <a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Native_messaging">native messaging</a> API, or compiled using <a href="https://webassembly.github.io/">WebAssembly</a> or <a href="/en-US/docs/Mozilla/Projects/Emscripten">Emscripten</a>. If you discover that functionality you need is not available, please <a href="https://mzl.la/webext-feature-needed">report the issue</a> to the developers.</p>
</div>

<p>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. <a href="/en-US/docs/Gecko" title="Gecko">Gecko</a> or <a href="/en-US/docs/Necko" title="Necko">Necko</a>) or by an application or even by an extension.</p>

<p>{{LandingPageListSubpages}}</p>

<p>{{CommunityBox("XPCOM", "dev-tech-xpcom", "mozilla.dev.tech.xpcom", "developers", "Tools|https://ted.mielczarek.org/code/mozilla/jscomponentwiz/|JavaScript Component Wizard++https://www.mytools360.com-a.googlepages.com/home#XPComPro|Visual C++ Component Wizard++https://www.yutools.com/wp/tools/yuxpcomwizard/?lang=en|Visual C++ Component Wizard for Visual Studio 2010++https://addons.mozilla.org/en-US/firefox/addon/xpcomviewer/|XPCOMViewer addon: browse XPCOM interfaces easily")}}</p>

<p>{{MakeSimpleQuicklinks("https://www.ibm.com/developerworks/library/os-xpcomfirefox/|Tutorial from IBM DeveloperWorks", "https://developer.mozilla.org/en-US/docs/Creating_Custom_Firefox_Extensions_with_the_Mozilla_Build_System|Binary components tutorial", "https://www.iosart.com/firefox/xpcom/|Linux and Windows how-to guide", "https://starkravingfinkle.org/blog/2006/10/mozilla-platform-xpcom-in-c/|Windows example blog post", "https://wanderingstan.com/2007-11-16/geekout_how_to_make_a_c_xpcom_component|Another Windows example", "https://rcrowley.org/2007/07/17/cross-platform-xpcom-a-howto.html|Mac OS X example", "/en-US/docs/Web/JavaScript")}}</p>
Revert to this revision