Recently in response to this post about integrating add-ons into Firefox, I was asked why some add-ons don’t work properly in the distribution/bundles directory. That’s a great question and it deserves its own post.
The answer is that add-ons in the distribution/bundles directory are not loaded like normal add-ons. All that happens is that their chrome.manifest file is loaded and read. They are never integrated into Firefox’s add-on manager. That means that if the add-on uses tries to use the AddonManager API, it will fail. It also means that restartless (bootstrapped add-ons) will not work either. Even though they have a chrome.manifest, it’s not used to integrate the add-on.
So if you search through the add-on and see that it depends on APIs like getResourceURI and hasResource, it will probably not work in the distribution/bundles directory. Keep in mind, though, that just because you see a reference to these APIs doesn’t mean that the add-on will break; the CCK uses this API, but has code around it just in case it fails.
If you find an add-on that doesn’t work in the distribution/bundles directory, the best course of action is to put it in the extensions directory where the executable is located. Those are loaded like normal add-ons.
As a side note, I’m going to try to use this post to kick off a Q&A series to try to encourage me to blog. If you have ANY questions about customizing Firefox, send them my way.