Commit Graph

28 Commits

Author SHA1 Message Date
Shu-yu Guo
37989840cd Bug 1202902 - Mass replace toplevel 'let' with 'var' in preparation for global lexical scope. (rs=jorendorff) 2015-09-15 11:19:45 -07:00
Dave Townsend
2a3f591cb0 Bug 1204012: Lightweight themes are disabled if any add-ons are detected or modified during startup. r=rhelmer
When a lightweight theme is active the default theme is the selected skin but
the default theme's addon object is marked as inactive (to deal with the horror
of only allowing the user to select a single theme through the UI).

During startup we should only switch back to the default theme if there is a
non-default skin selected that we didn't see.
2015-09-11 10:38:35 -07:00
Dave Townsend
8691738731 Bug 1192930 - Require a special certificate for system add-ons. r=rhelmer
Makes sure that add-on objects always have the _installLocation property for
the location they will be installed into so that isUsableAddon can test for the
right signature.
2015-08-26 16:14:00 -07:00
Dave Townsend
2261296844 Bug 1192921: Add an install location for system add-ons. r=rhelmer
This adds two new directory install locations. One contains the default system
add-ons that ship with the application, the other contains system add-on that
will eventually be updatable at runtime.

The updatable location tracks the expected list of add-ons in a pref. and only
returns add-ons from that list when asked for its list of add-ons.

After processFileChanges has scanned all add-ons and updated the database it
checks if the updated system add-ons match the expected set. If not we ignore
those add-ons when working out which add-ons should be visible. If they do match
then we ignore the app-shipped system add-ons when working out which are
visible.
2015-09-04 12:00:47 -07:00
Dave Townsend
1814f4e9b1 Bug 1192921: Remove most assumptions that add-on IDs match filenames. r=rhelmer
Normal directory install locations expect add-ons to exist on disk with the
naming convention "<id>.xpi". Originally system add-ons were going to do
something different so I started working on this. In the end it is unnecessary
but this work did reveal some cases where _sourceBundle wasn't being updated
for add-ons and removing most of these assumptions is still valuable.
2015-08-25 15:18:43 -07:00
Dave Townsend
c943c97092 Bug 1192921: Refactor add-on manager startup loop to better support validating install locations after scanning. r=rhelmer
The add-ons manager recognises the notion of "install locations". Each location
can contain add-ons that are installed in the application. There are two main
types, directory locations which exist as a directory somewhere in the
filesystem and registry locations which exist in the Windows registry. The
profile location is the one where add-ons installed through the UI exist, the
other locations are for add-ons that are bundled with the application,
installed by the OS or by third-party applications.

Install locations have priorities. The profile location has the highest priority
then the others gradually lower priorities. When an add-on exists in more than
one install location the version in the highest priority location is the one
that is visible and can be active in the application. We still retain details
about the other versions in the database.

On every startup the add-ons manager scans over these install locations to see
if the set of installed add-ons has changed at all. A very quick check is done
to see if the more thorough check in processFileChanges (which synchronously
loads the add-ons database and install manifests for the add-ons) is needed.

The job of processFileChanges is to load information about all the add-ons and
update the add-ons database to match. It has to decide which add-ons to make
visible, track what changes were made to the visible set of add-ons and call
restartless add-ons install and uninstall scripts.

The original version of processFileChanges attempted to optimise this by doing
all of the work in a single loop over the add-ons in the locations. This mostly
worked but made certain situations difficult to handle (see bug 607818 f.e.).
There isn't much need for this level of optimisation. We're already in a slow
pass and once all the data is loaded off the disk looping over it is fast.

This changeset moves processFileChanges into the XPIProviderUtils file which is
lazy loaded when necessary. While most of the code is the same it instead does
one loop to update the database and gather information, then a second loop to
update add-on visibility, record changes and call bootstrap scripts.
2015-08-21 16:49:56 -07:00
Dave Townsend
6bf3ccf9bb Bug 1190966: Ensure that the signature verification scan disables existing add-ons if the pref has been flipped in the meantime. r=rhelmer 2015-08-04 14:05:20 -07:00
Dave Townsend
31ea58effe Bug 1038068: Check add-on signatures and refuse to install unsigned or broken add-ons (preffed off for now). r=dveditz 2015-03-31 11:32:40 -07:00
Dave Townsend
3f1d257fbd Bug 1038068: Always log errors from saving the extensions database. r=dveditz 2015-04-23 14:43:37 -07:00
Carsten "Tomcat" Book
a3c4967237 Backed out changeset f99621542727 (bug 1038068) for test failures in test_corrupt.js etc on a CLOSED TREE 2015-04-23 09:09:30 +02:00
Dave Townsend
bf0e90bd4c Bug 1038068: Check add-on signatures and refuse to install unsigned or broken add-ons (preffed off for now). r=dveditz 2015-03-31 11:32:40 -07:00
Wes Kocher
8674979621 Backed out changeset 3b48e1a81a17 (bug 1038068) for xpcshell orange even after a clobbering IGNORE IDL 2015-04-21 18:21:52 -07:00
Dave Townsend
f158bf98d5 Bug 1038068: Check add-on signatures and refuse to install unsigned or broken add-ons (preffed off for now). IGNORE IDL. r=dveditz 2015-03-31 11:32:40 -07:00
Dave Townsend
218b02092a Bug 1040158: Allow overriding an add-ons multiprocessCompatible flag in the update manifest for an add-on. r=Unfocused 2015-01-30 17:20:12 -08:00
Dave Townsend
beb2d96d93 Backing out 3c49c72bbd26 from bug 1040158 due to test failures on a CLOSED TREE. 2015-02-04 10:46:35 -08:00
Dave Townsend
1a9cb911cb Bug 1040158: Allow overriding an add-ons multiprocessCompatible flag in the update manifest for an add-on. r=Unfocused 2015-01-30 17:20:12 -08:00
Chris Peterson
3daec5976b Bug 1102131 - Part 5: Remove deprecated let blocks and expressions in toolkit. r=Mossop 2014-11-19 23:50:25 -08:00
Irving Reid
3be82a2271 Bug 1049142: don't scan unpacked extensions if disabled; r=Unfocused 2014-09-16 12:48:15 -04:00
Irving Reid
744ce7a04e Bug 1064480 - add diagnostics for late saves; r=Mossop 2014-09-16 12:56:34 -04:00
Bill McCloskey
41bf97bced Bug 1029926 - Add a field to install.rdf for add-ons that are compatible with electrolysis (r=irving) 2014-07-14 22:10:06 -07:00
Jordan Santell
13e58e7f00 Bug 911098 - Implement Addon Debugger UI, r=fitzgen,harthur,mossop
From 8af4148dc10f18bf67e39442ee93169cb66382d5 Mon Sep 17 00:00:00 2001
---
 browser/devtools/debugger/debugger-controller.js   |  36 ++++++-
 browser/devtools/debugger/debugger-panes.js        |  17 +++-
 browser/devtools/debugger/test/browser.ini         |   1 +
 .../debugger/test/browser_dbg_addon-sources.js     | 108 ++++++++++++++++++++
 browser/devtools/debugger/test/head.js             |  29 ++++++
 browser/devtools/framework/ToolboxProcess.jsm      |  31 ++++--
 .../devtools/framework/toolbox-process-window.js   |  18 +++-
 modules/libpref/src/init/all.js                    |   3 +
 .../en-US/chrome/mozapps/extensions/extensions.dtd |   1 +
 toolkit/mozapps/extensions/content/extensions.js   |  55 +++++++---
 toolkit/mozapps/extensions/content/extensions.xml  |  31 +++++-
 toolkit/mozapps/extensions/content/extensions.xul  |   6 ++
 .../mozapps/extensions/internal/XPIProvider.jsm    |   4 +
 .../extensions/internal/XPIProviderUtils.js        |   2 +-
 .../test/addons/test_jetpack/bootstrap.js          |  17 ++++
 .../test/addons/test_jetpack/harness-options.json  |   1 +
 .../test/addons/test_jetpack/install.rdf           |  28 ++++++
 .../extensions/test/browser/browser-common.ini     |   1 +
 .../test/browser/browser_debug_button.js           | 112 +++++++++++++++++++++
 toolkit/mozapps/extensions/test/browser/head.js    |   3 +
 .../extensions/test/xpcshell/test_isDebuggable.js  |  36 +++++++
 .../extensions/test/xpcshell/xpcshell-shared.ini   |   1 +
 22 files changed, 508 insertions(+), 33 deletions(-)
 create mode 100644 browser/devtools/debugger/test/browser_dbg_addon-sources.js
 create mode 100644 toolkit/mozapps/extensions/test/addons/test_jetpack/bootstrap.js
 create mode 100644 toolkit/mozapps/extensions/test/addons/test_jetpack/harness-options.json
 create mode 100644 toolkit/mozapps/extensions/test/addons/test_jetpack/install.rdf
 create mode 100644 toolkit/mozapps/extensions/test/browser/browser_debug_button.js
 create mode 100644 toolkit/mozapps/extensions/test/xpcshell/test_isDebuggable.js
* * *
Leak fix
2014-03-25 10:59:14 -07:00
Wes Kocher
d02d099208 Backed out changeset 7d9bbb3ec194 (bug 911098) for debugger leaks on a CLOSED TREE 2014-03-24 18:36:42 -07:00
Jordan Santell
817da65e8e Bug 911098 Implement addon debugger UI, r=mossop,fitzgen,harthur 2014-03-24 15:35:44 -07:00
Irving Reid
95d1dae9bd Bug 986000 - Fix addonsListTmp undefined error in XPIProviderUtils.js. r=Mossop 2014-03-20 13:41:42 -04:00
Jeff Walden
a36fbf19da Bug 985729 - Construct the [[Prototype]] chain given to DBAddonInternal instances without using mutable __proto__. r=Unfocused 2014-03-19 16:21:00 +13:00
Irving Reid
1b152f9fe9 Bug 772484 - Allow user to cancel add-on update check and clean up correctly when they do. r=Unfocused 2014-03-14 08:52:55 -04:00
Emma Sajic
d857441e76 Bug 661982: Toolkit Add-ons Manager logging to be changed to use Log.jsm;r=irving 2014-02-23 12:27:59 -05:00
Alexander J. Vincent
124eff5db7 Bug 952307 - Move some addon-private JSM's to a subdirectory. r=Unfocused 2014-01-07 20:14:08 -08:00