Firefox 3.6 has removed support for XPCOM plugins!

January 29, 2010 24 Comments by Richard

Most who are deep in the plugin world already know this, but I will repeat it quickly for those who only dabble:

Firefox 3.6 has removed support for XPCOM plugins.

This means that if you use XPCOM for your javascript interface (i.e. you have an IDL file on your npapi plugin, you us nsScriptablePeer, etc) your plugin will no longer be able to communicate with javascript in Firefox 3.6.

Thus I repeat advice that I have given in the past: Never, never, *never*, *ever* use XPCOM for your javascript interface in your plugin.

There might conceivably be reasons to use other aspects of XPCOM in a plugin, that might even work in other browsers. At present, I don’t know of them. Please enlighten me if there are (cookies?).

Oh, yeah, and FireBreath now has linux and mac support (experimental) as well as windows support (stable). Come join the fun. http://firebreath.googlecode.com

Thank you. :-P

24 Comments

  1. Navaid
    7 years ago

    What is your source for this information (i.e. “Firefox 3.6 has removed support for XPCOM plugins.”)?

    The following link says otherwise.
    https://forums.addons.mozilla.org/viewtopic.php

    “XPCOM is how the whole Mozilla platform works, so it can't be removed from Firefox without some major changes”

    “XPCOM is available for add-ons on 3.6, and will be available for a long time to come.”

  2. Navaid
    7 years ago

    What is your source for this information (i.e. “Firefox 3.6 has removed support for XPCOM plugins.”)?

    The following link says otherwise.
    https://forums.addons.mozilla.org/viewtopic.php

    “XPCOM is how the whole Mozilla platform works, so it can't be removed from Firefox without some major changes”

    “XPCOM is available for add-ons on 3.6, and will be available for a long time to come.”

  3. Navaid
    7 years ago

    I have a plugin that was written a long time ago and it's not working in Firefox 3.6 (worked fine till 3.5). I know they have changed some things big time, but not sure if they have removed support completely for plugins.

  4. Navaid
    7 years ago

    I have a plugin that was written a long time ago and it's not working in Firefox 3.6 (worked fine till 3.5). I know they have changed some things big time, but not sure if they have removed support completely for plugins.

  5. taxilian
    7 years ago

    Let's look at what you quoted:
    “XPCOM is available for add-ons on 3.6, and will be available for a long time to come.”

    XPCOM is, indeed, available for *add-ons*. Not plugins, add-ons; there is a big difference. It may also be possible to access XPCOM from within an NPAPI plugin to get access to browser settings and such, however it is no longer possible to make your NPAPI plugin scriptable using XPCOM (e.g. provide a .xpt file with a compiled IDL, etc).

    Do a search on mozilla.dev.tech.plugins and you'll find a lot of the devs mentioning this, but my primary source is simply personal experience; they have removed support, and plugins that were written using .xpt files no longer are scriptable.

  6. taxilian
    7 years ago

    Let's look at what you quoted:
    “XPCOM is available for add-ons on 3.6, and will be available for a long time to come.”

    XPCOM is, indeed, available for *add-ons*. Not plugins, add-ons; there is a big difference. It may also be possible to access XPCOM from within an NPAPI plugin to get access to browser settings and such, however it is no longer possible to make your NPAPI plugin scriptable using XPCOM (e.g. provide a .xpt file with a compiled IDL, etc).

    Do a search on mozilla.dev.tech.plugins and you'll find a lot of the devs mentioning this, but my primary source is simply personal experience; they have removed support, and plugins that were written using .xpt files no longer are scriptable.

  7. taxilian
    7 years ago

    Of course they haven't removed support entirely for plugins; they just removed support for scripting with XPCOM (xpt files). Change it to use npruntime and it will probably work fine.

    Check out Firebreath (http://firebreath.googlecode.com) for another option; it's not hard to port an existing plugin to, and it works on IE as well with the same scripting code.

  8. taxilian
    7 years ago

    Of course they haven't removed support entirely for plugins; they just removed support for scripting with XPCOM (xpt files). Change it to use npruntime and it will probably work fine.

    Check out Firebreath (http://firebreath.googlecode.com) for another option; it's not hard to port an existing plugin to, and it works on IE as well with the same scripting code.

  9. Navaid
    7 years ago

    Having read your 3 part article on creating plugins, I feel better equipped to appreciate what you are saying. It appears that I will need to rewrite the scriptable class which was previously an XPCOM class to one based on NPObject.

  10. Navaid
    7 years ago

    Having read your 3 part article on creating plugins, I feel better equipped to appreciate what you are saying. It appears that I will need to rewrite the scriptable class which was previously an XPCOM class to one based on NPObject.

  11. taxilian
    7 years ago

    Consider using FireBreath when you do the rewrite; it would take a little more rewriting, but I've rewritten a couple of plugins into it so far and it has actually been pretty easy, and then it works in IE and NPAPI, and it's easier than doing just an NPAPI plugin.

    Whatever you do, good luck!

  12. taxilian
    7 years ago

    Consider using FireBreath when you do the rewrite; it would take a little more rewriting, but I've rewritten a couple of plugins into it so far and it has actually been pretty easy, and then it works in IE and NPAPI, and it's easier than doing just an NPAPI plugin.

    Whatever you do, good luck!

  13. John
    7 years ago

    I'm currently reading the Gecko documentation on streams, and i'm wondering if FireBreath supports streams. So far, FireBreath's documentation seems to focus on writing scriptable plugins.

  14. John
    7 years ago

    I'm currently reading the Gecko documentation on streams, and i'm wondering if FireBreath supports streams. So far, FireBreath's documentation seems to focus on writing scriptable plugins.

  15. taxilian
    7 years ago

    As of yet, it does not; I simply haven't needed them. there is an individual who is working on a model to add them, however, and you'd be a welcome addition to his efforts, should you care to join us. It is definitely on the list of features that need to be added. Inquire on the firebreath-dev list for more info

  16. taxilian
    7 years ago

    As of yet, it does not; I simply haven't needed them. there is an individual who is working on a model to add them, however, and you'd be a welcome addition to his efforts, should you care to join us. It is definitely on the list of features that need to be added. Inquire on the firebreath-dev list for more info

  17. Navaid
    7 years ago

    Bug 488042 – disable XPCOM plugin loading
    https://bugzilla.mozilla.org/show_bug.cgi?id=48

  18. Navaid
    7 years ago

    Bug 488042 – disable XPCOM plugin loading
    https://bugzilla.mozilla.org/show_bug.cgi?id=48

  19. taxilian
    7 years ago

    Thanks for posting that! Good to see the specifics of the change.

  20. taxilian
    7 years ago

    Thanks for posting that! Good to see the specifics of the change.

  21. tuanpham
    7 years ago

    Hi, Couldn't find a better spot to post this but I've been experimenting with firebreath, with the end goal of an NPAPI Scriptable plugin for FF. I've got the environment setup and building properly I believe, can register the produced dll, but when I try to use it via javascript, the methods/properties don't work. The only call that does seem to work is “.valid”. I added some trace statements in the control so I can see it is instantiated, but none of the methods seem to be registered properly. This is on Windows, VS2008, and IE 7/FF3.5. Can you point me in any directions that I could look at to figure out the source of my problem? Thanks!

  22. taxilian
    7 years ago

    Rather than answer this here, let me point you to a better spot to post this: please try the firebreath-dev mailing list here: http://groups.google.com/group/firebreath-dev/

    (I will give you the spoiler that you're probably not registering the methods/properties in the constructor, though)

  23. Dsliu
    7 years ago

    ” they just removed support for scripting with XPCOM (xpt files).”, I don’t agree with it. Because I develop xpcom and it works well with firefox 3.6.16. It still can be access in my javascript code.

  24. Stefano
    7 years ago

    it’s not userfriendly to develop addon’s in xpcom- .xpt since it lacks transparency to examine the compiled code for the normal user. its been used to sniff data or make (il)legal) requests against privacy policy. but you old farts maybe just not capable to learn something to do a new way.

Post a Comment

Your email is never published or shared. Required fields are marked *