Firefox 3.6 has removed support for XPCOM plugins!

Posted on January 29th, 2010 by Richard | Categories: ActiveX, Browser Plugin Development, NPAPI | Tags: , , , ,

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

  1. Navaid
    February 24th, 2010 at 12:03
    Reply | Quote | #1

    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
    February 24th, 2010 at 12:03
    Reply | Quote | #2

    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
    February 24th, 2010 at 12:08
    Reply | Quote | #3

    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
    February 24th, 2010 at 12:08
    Reply | Quote | #4

    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
    February 24th, 2010 at 16:25
    Reply | Quote | #5

    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
    February 24th, 2010 at 16:25
    Reply | Quote | #6

    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
    February 24th, 2010 at 16:26
    Reply | Quote | #7

    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
    February 24th, 2010 at 16:26
    Reply | Quote | #8

    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
    February 25th, 2010 at 09:48
    Reply | Quote | #9

    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
    February 25th, 2010 at 09:48

    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
    February 25th, 2010 at 15:31

    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
    February 25th, 2010 at 15:31

    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
    March 3rd, 2010 at 17:22

    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
    March 3rd, 2010 at 17:22

    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
    March 3rd, 2010 at 18:32

    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
    March 3rd, 2010 at 18:32

    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
    March 8th, 2010 at 11:52

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

  18. Navaid
    March 8th, 2010 at 11:52

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

  19. taxilian
    March 8th, 2010 at 16:05

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

  20. taxilian
    March 8th, 2010 at 16:05

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

  21. tuanpham
    March 16th, 2010 at 19:36

    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
    March 17th, 2010 at 05:01

    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)

blog comments powered by Disqus