Auto-apply updates #1442

arantius opened this Issue Oct 6, 2011 · 2 comments


None yet

2 participants

arantius commented Oct 6, 2011


If we write code properly, Firefox will auto-install updates for us. There's also a pref extensions.update.autoUpdateDefault I believe, that controls this.

Details need to be determined, but we should probably default to acting like Firefox does for extensions.


You can also set this this on a per-script basis using the applyBackgroundUpdates prop on ScriptAddon. These are the possible values.


So the current situation is that this setting doesn't really do much of anything for us. Our primary update checking codepath is in the greasemonkey component's runScripts(), which fires off update checking at the point in time that scripts actually run. (Another way to make sure we don't unnecessarily cause server load -- only check for updates on scripts that are actually in use.)

The way to get an update actually applied is (it seems) to call onUpdateAvailable() on an UpdateListener, passing it the addon and the addoninstall. It seems like ( ref ) any old object with an onUpdateAvailable property will do. But it will have to deal with 3.x as well...

@arantius arantius added a commit to arantius/greasemonkey that referenced this issue Oct 21, 2011
@arantius arantius Apply remote updates immediately upon discovery.
Firefox 4 only, yet.  This includes making the code work for both the automatically (at script run time) and manually (via add-ons manager UI) discovered code paths.

Refs #1442
@arantius arantius added a commit that closed this issue Oct 21, 2011
@arantius arantius Apply updates for Firefox 3.x.
Fixes #1442
@arantius arantius closed this in 4acfd64 Oct 21, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment