Add-ons Blog

Jetpack Project: weekly update for May 15, 2012

Project News

  • We released Add-on SDK 1.7 today. Please see the blog post and release notes for more info.
  • Nicholas Nethercote’s latest blog post mentions some progress on Nightly that will mitigate the problems users could see when using add-ons packed with older versions of the SDK and Firefox 15. Although we’ve seen good progress here, there are still some underlying issues, and we strongly recommend that you re-pack your older add-ons with SDK 1.7.
  • SDK developer Matteo Feretti ( aka ZER0 ) is speaking at JSDay in Verona tomorrow – let’s all wish him luck!

Quick Stats

Note: the stats above are based on the queries I linked to for each item. If you have suggestions on how these queries might be made more accurate,please comment below. Stats generated at 2012-05-15 08:12:38 PDT

Meeting Brief

  • no Builder update today
  • SDK: releasing 1.7 today, khuey’s latest patch reduces impact of platform changes on older SDK versions.
  • Roundtable: landing changes to self.dat as per Irakli’s ‘Spring Cleaning’ plan.

Full minutes are available here:
https://wiki.mozilla.org/Jetpack/Weekly_Meeting/2012-5-15#Minutes

Announcing Add-on SDK 1.7!

The Jetpack team is happy to announce the release of Add-on SDK version 1.7! You can download the SDK directly in either zip or tarball format. This version of the SDK is mostly a bug-fix release but with a few added features.

Some of the important features included in this release are:

For more new features and a list of the bug fixes that are shipping in this release, please see the Release Notes.

As of this writing the documentation for SDK 1.7 is not available in the usual place, however they should be available by Thursday, May 17th. I will update this post when they are live, but in the meantime you have two options:

  1. view them on Github: [ Tutorials & Guides ] [ Addon-kit API Docs ]
  2. download the SDK, activate the SDK environment and then run cfx docs to generate your own local copy of the documentation.

As always, we’d love to hear from you about your experiences with this release. You can contact us in a variety of ways:

post to our discussion group
chat with us on irc.mozilla.org #jetpack
report a bug
check out the source and contribute bug fixes, enhancements, or documentation

For more information on the Jetpack Project check out our wiki.

Add-on Compatibility for Firefox 13

Firefox 13 has been in beta for a while now, so this blog post is a bit overdue. Here’s an almost comprehensive list of the changes that went into Firefox 13 that can affect add-on compatibility. There is more information available in Firefox 13 for Developers, so you should read that too.

General

XPCOM

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

We will be doing an automatic compatibility validation and upgrading for add-ons on AMO that are compatible with Firefox 12, sometime in the next 2 weeks. I’ll also be working in Firefox 14 compatibility so that it doesn’t come in as late as this one.

Jetpack Project: weekly update for May 08, 2012

Project News

  • Mozillian Jono Xia gave a quick talk at the Monday project meeting to show off his new ‘Tab Reaper‘ extension which employs some clever tricks to bookmark and close tabs you haven’t looked at recently.
  • Yesterday morning I blogged about some upcoming changes to the SDK that will cause some potential breaking changes in future versions of the SDK. If you have comments on this issue, please head over to the google group post and tell us what you think.
  • Not content with that, last night I posted about some of the compatibility issues we’re seeing with older versions of the SDK and some of the latest changes in Firefox Nightly. The key message here is that, if you have an SDK-based Add-on on AMO right now, we’d really like you to re-pack it with SDK 1.6.1. Watch this space in the coming weeks for more on our outreach efforts around this issue.

Quick Stats

Note: the stats above are based on the queries I linked to for each item. If you have suggestions on how these queries might be made more accurate,please comment below. Stats generated at 2012-05-08 09:09:43 PDT

Meeting Brief

  • Builder: working on getting SDK usage stats out of AMO; some discussion around how SDK changes will impact builder, a larger topic that needs a break-out meeting
  • SDK: prep and coverage for next week’s 1.7 release
  • SDK: discussion on how to manage SDK / Firefox incompatibility – needs more discussion to see how we can manage this.
  • SDK: devs need to ensure that SDK tests don’t turn and keep tpbl tests orange – back out those changes!

Full minutes are available here:
https://wiki.mozilla.org/Jetpack/Weekly_Meeting/2012-5-8#Minutes

Memshrink progress, leaky add-ons and older SDK versions.

TL;DR: PLEASE Re-pack your add-ons with the latest SDK!

The SDK team has been collaborating with the Memshrink team to identify and fix various ‘zombie’ compartment leaks and similar issues. Nicholas Nethercote writes in his most recent update that Kyle Huey’s recent patch to address these issues is a real game-changer:

I did some testing of eight add-ons that are known to leak: McAfee SiteAdvisor 3.4.1(the old version that leaked every content compartment), Firebug 1.9.1, PicPasso 1.0.1, LoL 1.5, YouTube Ratings Preview 1.03, Enter Selects 7, HttpFox 0.8.10, and Link Resolve 0.7. I tested with a “before” browser build that lacked Kyle’s patch, and an “after” browser build that had it. For every one of the tested add-ons, I could reproduce the zombie compartment(s) with the “before” build, but could not reproduce any zombie compartment(s) with the “after” build. In other words, the patch worked perfectly.

There is an unfortunate side-effect of all this amazing, memory saving goodness which directly affects add-ons that have been packed with older versions of the SDK. If you want all the gory details, please head over to bug 751420.

The good: all you as an add-on dev need to do is re-pack their add-on with SDK version 1.6.1 or greater some time in the next 12 weeks and they should be able to neatly avoid this. Even if you miss this blog post, over the next few weeks we’re going to be planning more outreach to get developers to update, including directly reaching out to developers via AMO.

The bad: the Jetpack project invested some effort in trying tore-pack add-ons on AMO to upgrade them to more recent versions of the SDK, however last fall we stopped doing this in most cases because we found the process to be error prone.

The Future: some time this year the SDK’s loader and apis will start being shipped in Firefox; this will eliminate the need for jetpack developers to worry about what version of the apis is packed into their add-on’s xpi – because there won’t be!

In the meantime, we implore you to please, as soon as you can, re-pack and submit your SDK-based add-ons using SDK version 1.6.1!

Spring cleaning: changes to require and self in the SDK

Irakli recently posted a ‘Spring Cleaning’ todo list ( https://github.com/mozilla/addon-sdk/wiki/Spring-cleaning-2012 ) of changes we are proposing to make to the SDK in the next few months. While most of these changes deal with how the SDK is implemented and will not affect the behaviour of the top-level APIs, there are two specific changes that will change how the SDK behaves in specific circumstances.

Changes to require()

In the first case, the behaviour of the SDK’s require statement will be greatly simplified to support 3 explicit use cases: loading local modules via relative paths, loading module names from the SDK’s high level APIs, or loading via a dependency’s explicit path. Not only does this greatly simplify the implementation of the module loader, it will also allow us to make 3rd party module development and sharing much simpler. A nice side effect is that require will work exactly how it does in node.js.

The proposal clarifies the three styles to be used when requiring a module:

  1. Relative path for modules included in the add-on’s lib directory
    require('./utils/something')
            require('../foo/bar')
  2. Single term for high level SDK dependencies:
    require('panel')
            require('tabs')
  3. Complete require form for external dependencies:
    require('api-utils/functional')
            require('io/fs')
            require('package-name/module/path')

Once this change is made, require will raise warning for any deprecated require usage. Eventually support for older usage patterns for require will be removed.

Why are we doing this? The main goal is to remove ambiguity in how the argument you supply to require is resolved. Currently these patterns are supported, but will be deprecated:

   require('functional')
   require('fs')
   require('module/path')

In particular, the first example ( require('functional') ) currently means too many things:

   require('addon-kit/functional')
   require('api-utils/functional')
   require('./functional')
   require('io/functional')
   require('package-name/functional')

Changing to this more explicit require form makes us more compatible with other commonjs platforms like nodejs and also makes it distinction between high and low level APIs more obvious. While we will make our best efforts to keep high level APIs (ones that do not have `/` in require: require(‘panel’) ) backwards compatible at all times, we may change low level APIs when it makes sense.

Changes to self.data

In the second case, we will be changing how the SDK’s self module resolves the location of the data directory, specifically in the case where a statement like self.data.load is called from inside a package that is loaded in as a dependency in an add-on.

With the current implementation this code would try to load files from the package’s own data directory. In the proposed change we would instead load files from the add-ons main data directory.

Now, as far as we can tell this use of files in a package’s data directory is not a wide-spread practice, in fact Irakli could not find a single module on Builder that uses this behaviour. This is a breaking change to the SDK’s apis, however, but we think this particular use case is obscure.

As always, we’d love to hear your feedback on these changes and how they might affect you. We want to make sure we have your input before making changes such as these, and to ensure as much as possible that we do not break your add-ons as we improve the SDK.
I’ve also posted this info to the google user gorup for Jetpack, and we would appreciate we centralize discussion in that thread.

Adobe Acrobat Reader plugin blocked on Mac OS X

The Adobe Acrobat Reader plugin is currently causing problems for most Mac OS X users who have it installed. In the majority of cases, the plugin shows a blank page when a user clicks on a link to a PDF file. There are also reports of crashes when using the plugin in 32 bit mode. For this reason we have decided to add the plugin to the blocklist.

Mac OS X users who have this plugin installed will be prompted to disable it in the next 24 hours. You will have the option to keep it enabled, and even if you disable it when prompted, you will have the option to re-enable it in the Add-ons Manager. We are not blocking the Adobe Flash plugin, only the Adobe Acrobat NPAPI plugin.

We are currently working with Adobe so that a fixed version is released soon. We will post an update on this blog once that happens.

Add-ons Update – Week of 2012/05/03

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 1 month to review.
  • Most updates are being reviewed within 2 weeks.
  • Most preliminary reviews are being reviewed within 3 weeks.

These stats are taken from the last queue report:

  • 192 nominations in the queue awaiting review.
  • 84 updates in the queue awaiting review.
  • 159 preliminary review submissions in the queue awaiting review.

As you can see, we’re in need for some help. If you’re an experienced add-on developer and you would like to see the queues move along faster, please consider joining our team. Visit our wiki page for more information.

Test Your Add-ons for Memory Leaks!

The MemShrink team was assembled some time ago to work on reducing Firefox’s memory footprint. Many memory bugs have been filed and fixed for Firefox, but add-ons are also a significant factor in how much memory is being used.

There is an ongoing effort to track and stomp memory leaks in add-ons. Here’s where you can help, either by testing the add-ons you created, or testing the add-ons you use. Please read the article on Zombie Compartments, particularly the add-ons section. It should give you some pointers on how to find leaks and how to avoid them. The short version is: don’t hold any references to DOM objects after the document is closed.

The AMO review team is already aware of this, and we have added memory leaks to our testing policies. Add-on versions that leak generally won’t get full review.

There are also great news from the MemShrink camp. With the resolution of bug 695480, whole classes of compartment leaks have been resolved on the Firefox side. This means that even if an add-on holds on to DOM references when it shouldn’t, they will be properly claimed. But this doesn’t mean that you shouldn’t test and fix your code! This fix will be introduced in Firefox 15, so it’s some away anyway.

Firefox 12 Compatibility

The Firefox 12 compatibility blog post is up. It also includes some major changes coming in Firefox 13, so make sure to give it a read. The Firefox 12 compatibility bump should happen very soon.

The compatibility work for Firefox 13 is still pending. I promise to finish it soon!

Jetpack Project: weekly update for May 1, 2012

Project News

  • Jetpack contributor Hernán Colmeiro gave not 1, not 2 but 3 talks in Buenos Aires and Santiago last week on the SDK: “Add-on SDK, what is it? How do I help?
  • Irakli got hacking at the Firefox work week in Toronto this week and added SDK support to Firefox’s Scratchpad editor via his ‘Scratch-kit’ add-on.
  • Alex landed HTML localization, paving the way for developers and localizers to start fully localizing SDK-based add-ons!
  • Irakli posted his ‘Spring Cleaning’ list of things to address in the SDK in order to move forward with project plans. If you’re a module developer, please read over these and provide feedback in the mailing list as there are some changes that may break your code.
  • Some unsolicited praise from Mario Scheliga on twitter brightened up everyone’s week.

Quick Stats

Note: the stats above are based on the queries I linked to for each item. If you have suggestions on how these queries might be made more accurate,please comment below. Stats generated at 2012-05-01 09:42:31 PDT

Meeting Brief

  • Builder: no update today.
  • SDK: need to amend release process to make sure we always update maxVersion in our install.rdf template
  • Roundtable: test failures in nightly related to a patch last week from the Fx team, discussion around breaking changes in Irakli’s spring cleaning list, Alex is looking into more memory leak issues.

Full minutes are available here:
https://wiki.mozilla.org/Jetpack/Weekly_Meeting/2012-5-1#Minutes

Java block now complete for Mac OS X

Continuing with our effort to eradicate vulnerable versions of the Java plugin, we are now blocking it for all versions of Mac OS X. We had previously blocked it for old Mac OS X versions because they would not be updated anyway, and we were holding off on updating modern versions because of a bug in the Add-ons Manager that is now fixed in Firefox 12.

All users of Mac OS X 10.6 and above should have already been prompted to install this update. In order to avoid the block, please update immediately using Software Update. If for some reason you need to continue using an old version of the plugin, you can re-enable it in the Add-ons Manager.