Add-on Compatibility for Firefox 43

Jorge Villalobos

20

Firefox 43 will be released on December 15th. Here’s the list of changes that went into this version that can affect add-on compatibility. There is more information available in Firefox 43 for Developers, so you should also give it a look.

General

XPCOM

Signing

  • This is the first version of Firefox that will enforce signing. Unsigned add-ons won’t install and will be disabled by default. There’s a preference that turns signing enforcement off (xpinstall.signatures.required in about:config), but the current plan is to drop the preference in Firefox 44.

Please let me know in the comments if there’s anything missing or incorrect on these lists. If your add-on breaks on Firefox 43, I’d like to know.

The automatic compatibility validation and upgrade for add-ons on AMO will happen in the coming weeks, so keep an eye on your email if you have an add-on listed on our site with its compatibility set to Firefox 42.

AMO experiencing technical difficulties

Jorge Villalobos

19

Update: as of now (1:10pm PT), it looks like all major features are back to normal.

Due to a recent server migration, AMO has been experiencing some problems for the past few hours. While the site is up, installing and submitting add-ons isn’t working correctly at the moment. The developer and operations team are working hard on fixing these problems as soon as possible and we will update this post once the problems are resolved.

Promote your add-ons with the “Get the add-on” button

Amy Tsay

6

If you are an add-on developer, and you’d like something a little snazzy to help you promote your add-ons, our creative team has cooked up something for you!

The new “Get the add-on” button comes in two sizes:

172 x 60 pixels

AMO-button_1

129 x 45 pixels

AMO-button_2

Simply save these images, put them on your website, and link them to your add-on’s listing on addons.mozilla.org. Questions? Please head to our forums.

UPDATE: Thanks to Nino for providing the following code snippet that you can use to link the buttons to your add-on! (Replace “http://yoururlhere.com” with the link to your add-on).

172 x 60:
<a href=”http://yoururlhere.com”>
<img border=”0″ src=”https://addons.cdn.mozilla.net/static/img/addons-buttons/AMO-button_1.png” width=”172″ height=”60″>
</a>

129 x 45:
<a href=”http://yoururlhere.com”>
<img border=”0″ src=”https://addons.cdn.mozilla.net/static/img/addons-buttons/AMO-button_2.png” width=”129″ height=”45″>
</a>

UPDATE #2: Thanks to Kohei for creating Thunderbird versions!

172 x 60 pixels

TB-AMO-button_1

129 x 45 pixels

TB-AMO-button_2

If you’re interested in localizing the button for your language, please contact us.

Enjoy!

Friend of Add-ons: Tom Schuster (evilpie)

Amy Tsay

1

Our newest Friend of add-ons is Tom Schuster, aka evilpie. Tom is a JavaScript expert who has been a Mozillian for five years. Recently, he has contributed to the Web Extensions API initiative, implementing the chrome.cookies API and parts of the chrome.bookmarks API. He says,

“I have been contributing to Mozilla since 2010, because I feel like improving Firefox is the best way for me to ensure an open web. I am thankful for everything I have learned and the people I get to interact with.”

Thanks to Tom for his support!

We recently revamped the add-ons contribution wiki page, and it is now updated with the latest contribution opportunities, including information on helping with the Web Extensions API and FirefoxOS add-ons.

As always, please remember to document your contributions on the Recognition page. Thanks!

Add-ons Update – Week of 2015/11/04

Jorge Villalobos

I post these updates every 3 weeks to inform add-on developers about the status of the review queues, add-on compatibility, and other happenings in the add-ons world.

The Review Queues

  • Most nominations for full review are taking less than 10 weeks to review.
  • 142 nominations in the queue awaiting review.
  • Most updates are being reviewed within 7 weeks.
  • 70 updates in the queue awaiting review.
  • Most preliminary reviews are being reviewed within 7 weeks.
  • 141 preliminary review submissions in the queue awaiting review.

Review times for most add-ons have improved recently  due to more volunteer activity. Add-ons that are admin-flagged or very complex are still moving along slowly, but we’re in the process of getting more paid reviewer time in the coming weeks, which should help in that area.

If you’re an add-on developer and would like to see add-ons reviewed faster, please consider joining us. Add-on reviewers get invited to Mozilla events and earn cool gear with their work. Visit our wiki page for more information.

Firefox 42 Compatibility

The compatibility blog post is up, and the automatic validation was run last week.

Firefox 43 Compatibility

This compatibility blog post should come up soon.

As always, we recommend that you test your add-ons on Beta and Firefox Developer Edition to make sure that they continue to work correctly. End users can install the Add-on Compatibility Reporter to identify and report any add-ons that aren’t working anymore.

Changes in let and const in Firefox 44

Firefox 44 includes some breaking changes that you should all be aware of. Please read the post carefully and test your add-ons on Nightly or the newest Developer Edition.

Extension Signing

The wiki page on Extension Signing has information about the timeline, as well as responses to some frequently asked questions. The current plan is to turn on enforcement by default in Firefox 43.

Electrolysis

Electrolysis, also known as e10s, is the next major compatibility change coming to Firefox. In a nutshell, Firefox will run on multiple processes now, running content code in a different process than browser code. If you have questions about this, please join the #e10s channel on IRC.

Web Extensions

If you read the post on the future of add-on development, you should know there are big changes coming. We’re investing heavily on the new WebExtensions API, so we strongly recommend that you start looking into it for your add-ons. You can track progress of its development in http://www.arewewebextensionsyet.com/.

Join the Featured Add-ons Community Board

Amy Tsay

6

All the add-ons featured on addons.mozilla.org (AMO) are selected by a board of community members. Each board consists of 5-7 members who nominate and select featured add-ons once a month for six months…and the time has come to assemble a new board!

Featured add-ons help users discover what’s new and useful, and downloads increase drastically in the months they are featured, so your participation really makes an impact.

Anyone from the add-ons community is welcome to apply: power users, theme designers, developers, and evangelists. Priority will be given to applicants who have not served on the board before, followed by those from previous boards, and finally from the outgoing board. This page provides more information on the duties of a board member.

To be considered, please email us at amo-featured@mozilla.org with your name, and tell us how you’re involved with AMO. The deadline is Monday, Nov 9, 2015 at 23:59 PDT. The new board will be announced about a week after.

We look forward to hearing from you!

November 2015 Featured Add-ons

Amy Tsay

2

Pick of the Month: Google Translator for Firefox

by nobzol
Translate any text to your own language with one click or hot-key. You can either translate the selected text (the translated text will overwrite the original selected text), or you can translate a full page.

“I was tired of copying and pasting small messages, like tweets, or Facebook comments to understand what they were saying so it was very nice to find an add-on to do this.”

Featured: User-Agent Switcher

by Linder
Quickly and easily switch between popular user-agent strings. The User Agent is a string that the browser sends to websites to identify itself. This allows websites to serve different content depending on the browser, platform, and other factors. User-Agent Switcher lets you change the User Agent string so you can have your Firefox impersonate a Chrome browser, Safari on iOS, and so on, to see the content those browsers get.

Nominate your favorite add-ons

Featured add-ons are selected by a community board made up of add-on developers, users, and fans. Board members change every six months, so there’s always an opportunity to participate. Stayed tuned to this blog for the next call for applications.

If you’d like to nominate an add-on for featuring, please send it to amo-featured@mozilla.org for the board’s consideration. We welcome you to submit your own add-on!

Add-ons Update – Week of 2015/10/14

Jorge Villalobos

6

I post these updates every 3 weeks to inform add-on developers about the status of the review queues, add-on compatibility, and other happenings in the add-ons world.

The Review Queues

  • Most nominations for full review are taking less than 10 weeks to review.
  • 212 nominations in the queue awaiting review.
  • Most updates are being reviewed within 9 weeks.
  • 89 updates in the queue awaiting review.
  • Most preliminary reviews are being reviewed within 10 weeks.
  • 180 preliminary review submissions in the queue awaiting review.

We had a regression in review times in the last week or two due to reviewer availability, but we expect to catch up soon. We’re also adding another contractor to our team, hopefully soon.

If you’re an add-on developer and would like to see add-ons reviewed faster, please consider joining us. Add-on reviewers get invited to Mozilla events and earn cool gear with their work. Visit our wiki page for more information.

Firefox 42 Compatibility

The compatibility blog post is up. I filed the validator bugs today, so we’ll probably run the bulk validator sometime next week.

As always, we recommend that you test your add-ons on Beta and Firefox Developer Edition (formerly known as Aurora) to make sure that they continue to work correctly. End users can install the Add-on Compatibility Reporter to identify and report any add-ons that aren’t working anymore.

Changes in let and const in Firefox 44

The latest Nightlies include some breaking changes that you should all be aware of. Please read the post carefully and test your add-ons on Nightly.

Extension Signing

The wiki page on Extension Signing has information about the timeline, as well as responses to some frequently asked questions. The current plan is to turn on enforcement by default in Firefox 43.

Electrolysis

Electrolysis, also known as e10s, is the next major compatibility change coming to Firefox. In a nutshell, Firefox will run on multiple processes now, running content code in a different process than browser code.

Web Extensions

If you read Kev’s post on the future of add-on development, you should know there are big changes coming. We’re investing heavily on the new WebExtensions API, so we strongly recommend that you start looking into it for your add-ons. You can track progress of its development in http://www.arewewebextensionsyet.com/.

Breaking changes in let and const in Firefox Nightly 44

Jorge Villalobos

9

TL;DR

Many add-ons are currently broken on Nightly (Firefox 44) due to some changes that were done in the way let and const behave. These changes were introduced to make Firefox compliant with the final ES6 standard. These changes can lead to JS errors that break your code entirely, so we suggest you test your add-ons extensively to make sure they continue to work.

All add-ons built with JPM (except the latest version) are currently affected by this. We plan to automatically repack all affected JPM add-ons on AMO, but encourage you to repackage the add-on yourself and save some time. Pre-JPM versions of the SDK aren’t affected.

Update: additionally, with the change in bug 1167029, let blocks (like let (x = 42) { use(x); } ) will also stop working.

Please read on for the details of this change, written by Shu-yu Guo. It’s an interesting read even if your add-on isn’t affected.


SpiderMonkey has had non-standard let and const bindings for years. Recently we updated the semantics of let and const bindings for the global level to be compliant with ES6 semantics. ES6 semantics is not compatible with SpiderMonkey’s legacy semantics. (For an introduction to ES6 semantics, please refer to Jason Orendorff’s post.)

Did this update break your add-on? This post will help you diagnose and fix issues it caused.

Legacy Semantics

At the global level, legacy let was equivalent to var. Inside the parser, it was in fact parsed as if the token were var.

Global-level legacy const was like var, except that the property it introduced was read-only.

ES6 global lexical bindings are not properties

The biggest incompatibility is that ES6 let and const bindings, unlike their legacy counterparts, are no longer properties on the global object. Instead, they are bindings in the global lexical scope directly below the global object.

For example,

const x = 42;
// Prints false for ES6, true for legacy
dump('x' in this);

Many add-ons have the expectation that global let and const introduce properties. For instance, a legacy JSM might define constants and globals:

// Foo.jsm
const MY_CONSTANT = 42;
let gFoo = "foo";
 
// addon.js
var FooModule = Cu.import("Foo.jsm", {});
dump(FooModule.MY_CONSTANT);
dump(FooModule.gFoo);

With ES6 const, FooModule.MY_CONSTANT and FooModule.gFoo are both undefined, because their bindings are in a separate scope and not properties on the global object. This makes bugs caused by these errors particularly elusive.

For uses of global legacy let bindings that need to be accessed as properties, I recommend declaring them with var.

Unfortunately, there is no ES6 syntax with the same semantics as legacy const. If the read-only aspect of the property is necessary, I recommend manually defining a property on the global object:

Object.defineProperty(globalObject, "MY_CONSTANT", {
  value: 42,
  enumerable: true,
  writable: false
});

If your add-on imports XPCOMUtils, XPCOMUtils.defineConstant(obj, key, value) does exactly that.

ES6 global lexical bindings may not be redeclared

In ES6, global lexical bindings may not be redeclared in any way: not by let, const, nor var. For example, if the global level has let foo or const foo, any subsequent occurrences of let foo, const foo, or var foo will throw.

Redeclaration errors are easy to fix: rename the variable or remove the declarator and assign to the already-declared variable directly.

ES6 global lexical bindings have TDZ

In ES6, no lexical binding may be used before its declaration is reached. For example, the following throws:

dump(x);
let x;

This has long been regarded as poor style in the community, and fortunately, such errors in existing code are rare. If such an error is encountered, it is very likely a bug in the code.

Global lexical scope and JSSubScriptLoader

The subscript loader may load new scripts into the global scope. This interacts with the ES6 global lexical scope. The pitfall is that since lexical bindings may not be redeclared, loading multiple scripts that redeclare globals with let or const now result in error. For example,

// foo.js
let gFoo;
 
// bar.js
let gFoo;
 
// addon.js
loader.loadSubScript("foo.js");
loader.loadSubScript("bar.js"); // throws due to redeclaration of gFoo

Global lexical scope and the component loader

When loading components, such as via Cu.import, each component has its own global scope and global lexical scope, so cross-script redeclaration issues do not arise.

Cu.import returns the global object of the imported component, so the main pitfall is using let and const-declared bindings as properties on that scope.

Global lexical scope and custom scopes

Both the subscript and component loaders let users load scripts whose global variables and properties are stored in a user-provided scope object. For example, suppose we had foo.js:

// foo.js
var gVar;
let gLet;
const gConst;

Calling loader.loadSubScript("foo.js", myScope) would result in parsing foo.js with the following scope chain, from outermost to innermost:

     Global object
           |
  Global lexical scope
           |
        myScope
           |
          ...

Without user-passed scopes, var bindings go on the global object. Lexical let and const bindings go on the global lexical scope.

From the point of view of var bindings, myScope behaves like the global object: they capture var bindings as properties. That is, gVar is a property on myScope, not the global object.

Global lexical let and const bindings shadow global properties: gLet would hide a property reachable via this.gLet. Since myScope captures var bindings, consistency requires myScope to have its own lexical scope that captures let and const bindings:

     Global object
           |
  Global lexical scope
           |
        myScope
           |
  myScope's lexical scope

In the example, gLet and gConst are bindings in myScope‘s lexical scope. Multiple scripts loaded into myScope would get the same lexical scope. Scripts loaded into myOtherScope would get myOtherScope‘s lexical scope, an entirely different scope.

Note that lexical bindings are still not properties on the non-syntactic scope. If your add-on uses custom scopes, you may run into the problems described in “ES6 global lexical bindings are not properties” above.

Add-on Compatibility for Firefox 42

Jorge Villalobos

4

Firefox 42 will be released on November 3rd. Here’s the list of changes that went into this version that can affect add-on compatibility. There is more information available in Firefox 42 for Developers, so you should also give it a look.

General

XPCOM

  • Split nsIContentPolicy::TYPE_SUBDOCUMENT into TYPE_FRAME and TYPE_IFRAME. This should only affect your add-on if it implements nsIContentPolicy.
  • Use origin for nsIPermissionManager. Permissions in the Permission Manager used to be handled per-host, and now they will be handled per-origin. This means that https://mozilla.org and http://mozilla.org have different permission entries. This changes some methods in the Permission Manager so they accept URIs instead of strings.
  • Update: nsINetUtil.parseContentType has been renamed to parseResponseContentType as part of a security fix. Its behavior should remain the same.

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 42, I’d like to know.

The automatic compatibility validation and upgrade for add-ons on AMO will happen in the coming weeks, so keep an eye on your email if you have an add-on listed on our site with its compatibility set to Firefox 41.