views:

514

answers:

2

I'm unclear on the difference between the functioning of a plugin vs an extension.

For years, I've written a plain old NPAPI plugin. It lived in /Library/ Plug-ins on mac and somewhere similar on a PC. With Firefox 3.6, it stopped working. Looking around, I see this: http://blog.mozilla.com/security/2009/11/16/component-directory-lockd... which I figure might be the problem, so I try to turn my plugin into an XPI, but this turns it into an extension.

I install it, and it STILL doesn't work, but now I don't know if it doesn't work because extensions are a different beast than plugins, and so what I did makes no sense at all, or whether it's because of whatever the underlaying problem was before is still around, and so what I did was a waste of time, and didn't actually address the problem...

Can anyone give me some guidance here?

thanks.

A: 

The answer is "it's because of whatever the underlaying problem was before is still around". The lockdown post clearly states that you'll have problems only if you put your files inside Firefox.app/.../components (if you mentioned this link in your original post, you wouldn't have to try and make it into XPI).

The relationship between extensions and plugins is: an extension may include plugin(s), among other things. You can install plugins (without making them into an extension) in Firefox.

As for your original problem, unfortunately I have no idea why it doesn't work. I'm not well-versed with debugging NPAPI plugins and the only bit of information you shared is that it doesn't work in Firefox 3.6 :)

As a first step, does it appear in about:plugins or in Tools -> Addons?

Nickolay
When I wrote the original post I didn't KNOW about the link, it was a response to the same question on another forum... And at the time I didn't understand it well enough to see that you COULD put the plugin inside the firefox.app folder... As to your last question, yes, it does appear in tools->addons->plugins and it is active. And in about:plugins it shows my plugin with the correct mimetypes. It works correctly in 3.5.7, so SOMETHING changed in 3.6...
Brian Postow
A: 

You can install a plugin as part of an extension (optionally using an XPI) if you want.

The reason that your plugin stopped working in Firefox 3.6 is almost definitely that Firefox 3.6 stopped supporting the XPCOM method of providing a scripting interface. Most likely, your plugin loads but you can't talk to it in javascript.

For more information, look here: http://colonelpanic.net/2010/01/firefox-3-6-has-removed-support-for-xpcom-plugins/

Also, if you need to update it, you might consider using FireBreath, which extracts a lot of that complexity away from you.

Taxilian