Firefox 18 will be released on the second week of January. Here’s the list of changes that went into Firefox 18 that can affect add-on compatibility. There is more information available in Firefox 18 for Developers, so you should read that too.
General
- app:// protocol and XHR. If you load local resources using XHR and you check for status == 0, this will no longer work. You must check for status == 200, like with a regular request.
- Move various onfoo event listeners off of DOM objects. addEventListener should always be favored. If you need to set an on* property to add an event listener, you should set it to a function instead of an object containing the handleEvent function. Updated: There’s more information on this MDN page.
- Remove synchronous proxy API and synchronous DNS resolution. This changes nsIProtocolProxyService and nsIProxyAutoConfig, as well as the newProxiedChannel function, in order to make them asynchronous.
- Remove calls to nsICacheSession::openCacheEntry on the main thread. asyncOpenCacheEntry should be used instead.
- Remove BlobBuilder. The Blob constructor should be used instead.
- WebSocket constructor fails from the scope of an add-on. This bug is no longer present in Firefox 18, but it was during a big part of the 18 beta cycle. It was particularly easy to reproduce in add-ons using the Add-ons SDK. If this bug affected you, make sure you test again on the latest beta.
- Porting Websockets to WebIDL. This should only affect add-ons who are creating WebSockets using XPCOM instead of the global constructor. This will no longer be possible.
Private Browsing
Private Browsing Mode is changing to support private and non-private windows opened at the same time. This means that many XPCOM interfaces and other functions are changing to support it. The changes are mostly new parameters that tell the function which context it is being called from, so that it can work accordingly.
- Move the removeDataFromDomain API into its own service. The function was moved to a JS module: ClearRecentHistory.jsm.
- Make network favicon requests inherit private browsing context. This adds a new argument to setAndLoadFaviconForPage.
- imgLoader uses global PB notifications. Using imgICache or imgILoader is now deprecated. imgITools should be used instead. See the imgICache docs for more information.
- nsWebBrowserPersist::SaveURIInternal creates a channel out of thin air. saveURI has a new argument, and there’s a new savePrivacyAwareURI function.
- Add privacy status to nsDownload. This adds new arguments to nsIDownloadManager.addDownload, nsITransfer.init, and saveURL from contentAreaUtils.
There’s more information about the new private browsing in these docs: Supporting PBM, and Updating add-ons broken by PB changes.
New!
Please let me know in the comments if there’s anything missing or incorrect on these lists. If your add-on breaks on Firefox 18, I’d like to know.
The automatic compatibility validation and upgrade for add-ons on AMO will happen next week, so check your email.
Josh Matthews wrote on
Boris wrote on
Ken wrote on
Dave wrote on
Boohbah wrote on
MM wrote on
Jorge Villalobos wrote on
Fixed Point wrote on
Jorge Villalobos wrote on
Fixed Point wrote on
Fixed Point wrote on
Jorge Villalobos wrote on
Fixed Point wrote on
Fixed Point wrote on
Jorge Villalobos wrote on
MM wrote on
Jaluki wrote on
Keith wrote on
Glen wrote on
Jorge Villalobos wrote on
Nani Games wrote on
bikerdon wrote on