Firefox 7 was moved to the Aurora channel a little over a week ago, and we’re preparing to run the automated compatibility upgrade for all add-ons on AMO that are already compatible with Firefox 6. If you want to benefit from these compatibility bumps, your add-on should have a maximum compatibility of 6.* at present. If no compatibility problems are detected, we will automatically increase it to 7.* when the validation is run.
Our analysis of the bug fixes for Firefox 7 has produced the following list of notable changes for add-on developers. They are mostly XPCOM interface removals, some of them currently in use by add-ons listed on AMO. Please have a look and update your add-on code accordingly:
- The encode and decode methods in nsIJSON have been removed. Bug 645922. This fix affects a very large portion of add-ons, so there’s an effort aiming to revert it. Either way, we strongly recommend you to use the global JSON object and the parse and stringify functions instead of the XPCOM component.
- (Updated) The nsINavHistoryObserver and nsINavBoorkmarkObserver interfaces have changed to better accommodate Firefox Sync. Bug 633266. Several of its methods have a new parameter (a GUID). Since add-ons are normally in the observer position, this just means you get more data, so no change is necessary. Binary consumers will need to update the function signatures, though.
- (Updated) A number of methods have been removed from the nsIDOMFile interface, notably getDataAsURL and getAsBinary. Bug 661876. Equivalent functions are available in other objects, like FileReader.
- A few other interfaces were removed: nsIDOM3Node (bug 659053), nsIDOM3TypeInfo (bug 660539), schemaTypeInfo (bug 660539), nsIDOMNSDocument (bug 658906), and nsIDOMDocumentStyle (bug 658904).
More details can be found in Firefox 7 for Developers, as well as some new features that really exciting to have:
- It is now possible to unload JS modules, making them a more viable option for restartless add-ons. Bug 481603.
- Inline preferences. You can now display your preferences panel inside the Add-ons Manager, instead of using a separate window. While there are limitations to what you can do with this, it should work fine for a large subset of add-ons. Plus, it also works for restartless add-ons, which is a big win.
If there are any other compatibility troubles you have run into while testing on Firefox 7 that hasn’t been mentioned here, please leave a comment below.
Firefox 8
It’s still early to worry about Firefox 8, but there are a couple of big changes coming your way that I thought I should mention as soon as possible:
- The nsIDOMWindowInternal interface will be removed. Bug 670235. Judging by the patch, you should be doing QI to nsIDOMWindow instead.
- There is work being done to implement an incremental GC for the JS engine. This could potentially affect add-ons with binary components that use the JSAPI to create a custom JSClass and
objects of that class, and the objects of the custom class have a custom GC trace function. It sounds fairly specific to actually be common, but I just want to throw this out there in case anybody is affected by it. You can contact me if you need more information about this.
Firefox 8 for developers is already available and should be growing in length in the following weeks.
Kyle Huey
wrote on
:
Jorge Villalobos
wrote on
:
Kyle Huey
wrote on
:
Neil Rashbrook
wrote on
:
Jorge Villalobos
wrote on
:
Matthew Tuck
wrote on
:
Jorge Villalobos
wrote on
:
Jeferson H.
wrote on
:
Wladimir Palant
wrote on
:
Kohei Yoshino
wrote on
:
Jorge Villalobos
wrote on
:
Steve Jackson
wrote on
:
Katie Kalata
wrote on
:
Katie Kalata
wrote on
:
Jorge Villalobos
wrote on
:
Anh
wrote on
:
Einard
wrote on
:
Einard
wrote on
:
Jim
wrote on
:
Joe Y.
wrote on
:
Mar
wrote on
:
Paul
wrote on
:
Rick
wrote on
:
phil
wrote on
:
simon
wrote on
:
john b
wrote on
:
Jorge Villalobos
wrote on
:
Jorge Villalobos
wrote on
:
jeff
wrote on
:
Jorge Villalobos
wrote on
: