Yesterday, we faced a strange problem with firefox addons. We had a addon that was working perfectly on firefox 3.5 but not on firefox 3.6.
As we glanced through, we could notice there were no such Components that was relying particularly on firefox 3.5. So, here we had, a perfectly working addon on 3.5 that isn’t working on firefox 3.6.
As we glanced further, we noticed we had used variables in Global scope as follows.
var stringsBundle = null; var gNavigatorBundle = null;
We removed the null initialization and replaced them with var stringsBundle; var gNavigatorBundle; and woila it worked.
We just couldn’t believe that removing null initialization solved the problem. But that said, it wasn’t right solution. As we started looking at the source code of firefox 3.6.2 we noticed that, these two variables., stringsBundle and gNavigatorBundle were already defined in the Global scope. Hence reinitializing them to null in the Global scope was causing an issue with our addon. We modified the variable names to get our addon working in firefox 3.6 as well.