Today we are announcing some major upcoming changes to Firefox add-ons. Our add-on ecosystem has evolved through incremental, organic growth over the years, but there are some modernizations to Firefox that require some foundational changes to support:
- Taking advantage of new technologies like Electrolysis and Servo
- Protecting users from spyware and adware
- Shortening the time it takes to review add-ons
To help the add-on development community understand how we will enable these improvements, we are making four related announcements today:
- We are implementing a new extension API, called WebExtensions—largely compatible with the model used by Chrome and Opera—to make it easier to develop extensions across multiple browsers.
- A safer, faster, multi-process version of Firefox is coming soon with Electrolysis; we need developers to ensure their Firefox add-ons will be compatible with it.
- To ensure third-party extensions provide customization without sacrificing security, performance or exposing users to malware, we will require all extensions to be validated and signed by Mozilla starting in Firefox 41, which will be released on September 22nd 2015.
- We have decided on an approximate timeline for the deprecation of XPCOM- and XUL-based add-ons.
For our add-on development community, these changes will bring benefits, like greater cross-browser add-on compatibility, but will also require redevelopment of a number of existing add-ons. We’re making a big investment by expanding the team of engineers, add-on reviewers, and evangelists who work on add-ons and support the community that develops them. They will work with the community to improve and finalize the WebExtensions API, and will help developers of unsupported add-ons make the transition to newer APIs and multi-process support.
We’re announcing all of the changes today to make developers aware of our plans and to give everyone an opportunity to offer feedback. We are committed to doing what we can to make this transition as easy as possible. Together with our Mozilla community, we will create the future of Firefox add-ons.
Introducing the WebExtensions API
For some time we’ve heard from add-on developers that our APIs could be better documented and easier to use. In addition, we’ve noticed that many Firefox add-on developers also maintain a Chrome, Safari, or Opera extension with similar functionality. We would like add-on development to be more like Web development: the same code should run in multiple browsers according to behavior set by standards, with comprehensive documentation available from multiple vendors.
To this end, we are implementing a new, Blink-compatible API in Firefox called WebExtensions. Extension code written for Chrome, Opera, or, possibly in the future, Microsoft Edge will run in Firefox with few changes as a WebExtension. This modern and JavaScript-centric API has a number of advantages, including supporting multi-process browsers by default and mitigating the risk of misbehaving add-ons and malware.
WebExtensions will behave like other Firefox add-ons; they will be signed by Mozilla, and discoverable through addons.mozilla.org (AMO) or through the developer’s website. With this API, extension developers should be able to make the same extension available on Firefox and Chrome with a minimal number of changes to repackage for each platform.
A preview release of WebExtensions is available in Firefox 42, which is currently on Developer Edition, and information on how to start testing WebExtensions is available in the Mozilla wiki. We have started discussions with other browser vendors to begin an effort to standardize at least some of this API, and will continue to post additional information and more details about WebExtensions in the wiki.
Multi-process Firefox and Add-ons
Phase one of our Electrolysis project, which uses a separate operating system process to run Web content, has been moving towards our release channel. Subsequent phases will bring multiple content processes and improved sandboxing capabilities. Using a separate rendering process lays the foundation enabling us to bring significant performance and security improvements to Firefox, but it also breaks some add-ons, especially those that modify content. However, there are a number of mitigations in place to keep add-ons functional:
- WebExtensions are fully compatible with Electrolysis. As the API matures and Electrolysis is enabled by default, this will be the way to port or develop extensions for Firefox.
- Add-ons based on the Jetpack SDK will work well as long as they don’t use
require(‘chrome’)
or some of the low-level APIs to touch objects in the content process. - Add-ons that haven’t been upgraded to work with Electrolysis will run in a special compatibility environment that resembles single-process Firefox as much as possible. If an add-on touches content, the access will happen via cross-process object wrappers (CPOWs). However, CPOWs are much slower than the equivalent DOM operations in single-process Firefox, and can affect the user experience negatively. Also, some accesses aren’t supported by the compatibility layer and will throw exceptions.
Starting now, add-on developers need to think about their strategy to work with a multi-process Firefox:
- Get familiar with Electrolysis and its add-on development guidelines.
- Test add-ons with Electrolysis enabled in Firefox Developer Edition.
- Update add-ons as required to remove the reliance on CPOWs, make them Electrolysis-compatible, and set the multi-process compatible flag to identify your extension as compatible.
- Start to consider how existing extensions will make use of the WebExtensions API.
The final release schedule for Electrolysis will be determined over the next several months as we test with more users. We would like developers to understand that, although there is a chance that the Electrolysis release schedule will be delayed or modified in the coming months, they should plan to update their add-ons to meet our current release plan as follows:
- August 11th (Firefox 42 merges to Developer Edition). Electrolysis has been enabled by default on Developer Edition (it is already the default on Nightly).
- September 22nd (Firefox 42 merges to Beta). Electrolysis will be available to users as an “opt-in” on the beta channel.
- November 3rd (Firefox 43 merges to Beta). The earliest release Electrolysis will be enabled by default on Beta. When Electrolysis is enabled by default we will begin blocklisting Electrolysis-incompatible add-ons that cause major performance and/or stability problems.
- December 15th (Firefox 43 merges to release). The earliest release Electrolysis will be enabled on the release channel, and our current planned release.
- Six months past enabling Electrolysis on Release. The deprecation of CPOWs and compatibility shims will begin. We will release further scheduling information as appropriate, but developers should be aware that any add-ons that depend on them will stop working within six to twelve months of the general availability of Electrolysis.
The Electrolysis team has posted a list of popular add-ons for compatibility testing at http://arewee10syet.com. In addition to the steps above, developers are encouraged to review the list and follow the instructions to submit information about whether their add-ons are Electrolysis-compatible or not.
Signing
We currently use a blocklisting mechanism to defend against malicious add-ons, but additional measures are needed to better protect our users as some add-on developers have adapted to work around blocklisting. Blocklisting is also reactive: users can be harmed by dangerous add-ons that are installed until they are identified and blocked. Starting in Firefox 42, add-on developers will be required to submit extensions for review and signing by Mozilla prior to deployment, and unsigned add-ons cannot be installed or used with Firefox. You can read more about the rationale for signing in a separate blog post.
We realize that the add-on review process can sometimes be inconvenient for developers. Reviewing is a mostly manual, human process today, and moving an extension from the initial submission to passing a full review that meets our guidelines can be a time-consuming process that can take weeks or months. A major advantage of WebExtensions is that they can be reviewed more quickly. In general, it’s easier to develop a correct WebExtension, and the permissions system makes it easier to recognize malicious add-ons.
Our goal is to increase automation of the review process so that the wait time for reviews of new WebExtensions listed on addons.mozilla.org can be reduced to five days, and that the wait time for updates to existing WebExtensions can be reduced to one to two days. Current wait times for unlisted add-ons submitted for signing are less than three days. We are also expanding the team of paid and volunteer add-on reviewers and continue to make improvements to the automatic validator, both of which will reduce existing review queue wait times for all extensions in the immediate future.
While extension signing will not be enforced until Firefox 42, the code has shipped with Firefox 40, allowing users to see if installed extensions have been validated by Mozilla. Users of Firefox Developer Edition will have noticed that unsigned add-ons were blocked beginning on August 14.
The full schedule for add-on signing is currently as follows:
- Firefox 40: Users will see a warning in the add-ons manager about unsigned extensions, but all extensions will continue to work.
- Firefox 41: Unsigned extensions will be disabled by default, and Firefox will have a preference (
xpinstall.signatures.required
) that allows signature enforcement to be turned off. - Firefox 42 and beyond:
- The Beta and Release versions of Firefox based on 42 and above (Beta 42 will be released at the same time as Firefox 41) will remove the preference that allows unsigned extensions to be installed, and will disable and/or prevent the installation of unsigned extensions.
- The Nightly and Developer Editions of Firefox based on 42 and above will retain the preference to disable signing enforcement, allowing the development and/or use of unsigned add-ons in those versions. Unbranded versions of Firefox based on releases will also be made available for developers, and are expected to be in place for Firefox 42 for release (and potentially beta).
Deprecation of XUL, XPCOM, and the permissive add-on model
XPCOM and XUL are two of the most fundamental technologies to Firefox. The ability to write much of the browser in JavaScript has been a huge advantage for Mozilla. It also makes Firefox far more customizable than other browsers. However, the add-on model that arose naturally from these technologies is extremely permissive. Add-ons have complete access to Firefox’s internal implementation. This lack of modularity leads to many problems.
A permissive add-on model means that we have limited flexibility in changing the foundations of Firefox. The add-on breakage caused by Electrolysis is an important example of this problem. Technologies like CPOWs help us to work around add-on problems; however, CPOWs have been a huge investment in effort and they are still slow and somewhat unreliable.
Without a fundamental shift to the way Firefox add-ons work, we will be unable to use new technologies like Electrolysis, Servo or browser.html as part of Firefox.
The tight coupling between the browser and its add-ons also creates shorter-term problems for Firefox development. It’s not uncommon for Firefox development to be delayed because of broken add-ons. In the most extreme cases, changes to the formatting of a method in Firefox can trigger problems caused by add-ons that modify our code via regular expressions. Add-ons can also cause Firefox to crash when they use APIs in unexpected ways.
Consequently, we have decided to deprecate add-ons that depend on XUL, XPCOM, and XBL. We don’t have a specific timeline for deprecation, but most likely it will take place within 12 to 18 months from now. We are announcing the change now so that developers can prepare and offer feedback. Add-ons that are built using the new WebExtension API will continue to work. We will also continue supporting SDK add-ons as long as they don’t use require(‘chrome’)
or some of the low-level APIs that provide access to XUL elements.
A major challenge we face is that many Firefox add-ons cannot possibly be built using either WebExtensions or the SDK as they currently exist. Over the coming year, we will seek feedback from the development community, and will continue to develop and extend the WebExtension API to support as much of the functionality needed by the most popular Firefox extensions as possible.
Moving forward
The strategy announced here necessarily involves a lot of trade-offs. Developers who already support Chrome extensions will benefit since they will have one codebase to support instead of two. Developers of Firefox-only add-ons will have to make changes. Those changes may require considerable development effort up-front, but we feel the end result will be worth that effort for both Firefox’s users and developers.
We want to reiterate our commitment to our add-on development community, and will work with you in porting extensions, designing new APIs, and creating innovative new add-ons that make Firefox great.
We will continue to post additional resources in the coming weeks and months to outline each of these changes in more detail, as well as provide support through our traditional channels via the Mozilla Developer Network, IRC (in #extdev), and the extension developer group.
Update: A lot of people have been asking what WebExtensions will deliver, and how. Bill McCloskey has posted an update on where we want to take them, and how you can contribute ideas and be part of the process. It’s a must-read for people who are concerned about how the addons they develop, use, and love will continue to be part of Firefox.
Update: We’ve added a Frequently Asked Questions section to the WebExtensions page, and will continue to address feedback and questions there along with additional posts in the near future.
Anonymous wrote on
Jorge Villalobos wrote on
Kyle wrote on
Jorge Villalobos wrote on
flying sheep wrote on
Jorge Villalobos wrote on
Timo Kissing wrote on
Jorge Villalobos wrote on
Mook wrote on
Dan Simmons wrote on
Jorge Villalobos wrote on
Markus Reinhorn wrote on
Kym Farnik wrote on
Anonymous wrote on
LimboSlam wrote on
Gary51 wrote on
Internet wrote on
Connor Behan wrote on
moot wrote on
Anonymous wrote on
Adi wrote on
Utkarsh Ray wrote on
Stan Greeb wrote on
MrSnowman wrote on
Anonymous wrote on
E. Jung wrote on
firecuck wrote on
The Ublock Team wrote on
Manuel wrote on
Salar wrote on
Chris wrote on
Curtis Kwong wrote on
rich wrote on
FITB wrote on
Panayiotis Andriopoulos wrote on
Cocaine wrote on
Marco wrote on
Matthias wrote on
Maave wrote on
Connor Behan wrote on
I AM OUT wrote on
Nik wrote on
Jorge Villalobos wrote on
Krasnaya Ploshchad wrote on
Simon wrote on
YouTube Center User wrote on
Jorge Villalobos wrote on
anon wrote on
EH wrote on
anon wrote on
Name wrote on
ZXSpectrum wrote on
Tex wrote on
irlittz wrote on
KM wrote on
Darvo wrote on
Anonymous wrote on
Anton wrote on
Noitidart wrote on
Jake wrote on
NoNames wrote on
Connor Behan wrote on
vertigoback wrote on
Mike wrote on
cry wrote on
Riik wrote on
INeedANewBrowser wrote on
Haider Rehman wrote on
ZXSpectrum wrote on
tux. wrote on
cry wrote on
Timothy wrote on
Robin Hell wrote on
Jorge Villalobos wrote on
Sean wrote on
Joe wrote on
Curtis Kwong wrote on
Anonymous wrote on
Brett Zamir wrote on
Brett Zamir wrote on
Robert O’Callahan wrote on
Noitidart wrote on
trlkly wrote on
Noitidart wrote on
Harsha wrote on
Lestat wrote on
Mike wrote on
tux. wrote on
Lestat wrote on
John Constantine wrote on
Riik wrote on
Brian wrote on
Muzzy wrote on
Anonymous wrote on
Henry Wilkenson wrote on
Travis wrote on
GG wrote on
Scott Turner wrote on
Jorge Villalobos wrote on
Mr Robot wrote on
Alexufo wrote on
ZXSpectrum wrote on
alyandon wrote on
Revre wrote on
Tom wrote on
Krasnaya Ploshchad wrote on
anon wrote on
Marnes wrote on
Anonymous wrote on
David wrote on
Dan wrote on
Norbert wrote on
Curtis Kwong wrote on
Chris wrote on
Isaben wrote on
john wrote on
Jorge Villalobos wrote on
Eric wrote on
Elliot wrote on
Nope wrote on
Felicia wrote on
TakeNoticeFFCommity wrote on
Oak Tree wrote on
Curtis Kwong wrote on
Anonymous wrote on