Commit Graph

1984 Commits

Author SHA1 Message Date
Carsten "Tomcat" Book
6d62391762 merge mozilla-inbound to mozilla-central a=merge 2015-09-15 15:05:24 +02:00
Dave Townsend
e4b5d1d1ce 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
Trevor Rowbotham
2a6b03e14f Bug 1180901 - Test that an extension can be installed when a locked file exists in the extensions trash directory as long as the extension being installed does not touch the locked file. r=mossop 2015-09-09 13:44:00 +02:00
Christoph Kerschbaumer
01b73fef69 Bug 1195162 - Move mozapps/plugins into pluginproblem (r=sicking,bsmedberg) 2015-09-14 19:08:06 -07:00
Carsten "Tomcat" Book
ff0bd9ddb8 Merge mozilla-central to fx-team 2015-09-09 14:10:46 +02:00
Dave Townsend
c7dd40195a 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
2db990ee59 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
8581ab0dc2 Bug 1192921: Split DirectoryInstallLocation into an immutable and mutable version. r=rhelmer
Most directory install locations are immutable at runtime. Only the profile
location can be installed into and uninstalled from. The system add-on locations
will be immutable as well but also be extended with some extra functionality so
it is useful to split the immutable parts out into a shared class that both
the mutable location and eventually system add-on locations can inherit from.
2015-08-25 16:01:55 -07:00
Dave Townsend
71e6a5d597 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
2369f350d7 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
4c860c336a Bug 1192921: Load XPIProviderUtils in a sandbox to simulate the way it is loaded in B2G. r=rhelmer 2015-09-04 12:22:24 -07:00
Dave Townsend
f51587c91b Bug 1194784: Sideloaded add-ons without full signing don't display an appropriate warning in the add-ons manager. r=dao 2015-09-03 12:39:29 -07:00
Phil Ringnalda
58c7cc9c5e Backed out 4 changesets (bug 1192921) for b2g desktop Gu hangs
Backed out changeset 1bfa2dead61f (bug 1192921)
Backed out changeset f310cab1dd4e (bug 1192921)
Backed out changeset c3009691dfe6 (bug 1192921)
Backed out changeset d8233b994741 (bug 1192921)
2015-09-03 20:53:50 -07:00
Dave Townsend
e9793aa910 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-08-10 15:47:28 -07:00
Dave Townsend
42f94e0c1f Bug 1192921: Split DirectoryInstallLocation into an immutable and mutable version. r=rhelmer
Most directory install locations are immutable at runtime. Only the profile
location can be installed into and uninstalled from. The system add-on locations
will be immutable as well but also be extended with some extra functionality so
it is useful to split the immutable parts out into a shared class that both
the mutable location and eventually system add-on locations can inherit from.
2015-08-25 16:01:55 -07:00
Dave Townsend
0bf7280fef 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
512fe2b1fe 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
5bd0f87c4e Bug 1200027: Fix installing add-ons from the AMO discovery pane in the add-ons manager. r=dveditz 2015-08-31 11:23:39 -07:00
Wes Kocher
7dbe08c0ba Merge m-c to inbound, a=merge CLOSED TREE 2015-09-08 17:06:42 -07:00
Dragana Damjanovic dd.mozilla@gmail.com
e1e32f6ff4 Bug 1202421 - Rename the network.auth.allow-subresource-auth pref. r=michal 2015-09-08 08:21:19 -07:00
Philipp Kewisch
25d03cdace Bug 1197617 - Fix addon signing tests to work when addon signing is disabled. r=Mossop 2015-09-01 12:48:12 +02:00
Mike Kaply
7c53713de1 Bug 608972 - Make sure there is a theme author before using it. r=Mossop 2015-08-31 07:42:04 -05:00
Nicholas Nethercote
10d95cca57 Bug 1198334 (part 1) - Replace the opt-in FAIL_ON_WARNINGS with the opt-out ALLOW_COMPILER_WARNINGS. r=glandium.
The patch removes 455 occurrences of FAIL_ON_WARNINGS from moz.build files, and
adds 78 instances of ALLOW_COMPILER_WARNINGS. About half of those 78 are in
code we control and which should be removable with a little effort.
2015-08-27 20:44:53 -07:00
Ryan VanderMeulen
4bb865146b Backed out changeset 292d13beeb7b (bug 1186522) for Gaia unit test bustage. 2015-08-28 21:43:37 -04:00
Jordan Lund
a445a72f53 Bug 1186522 - force per checkin builds to require signed add-ons on beta 42, r=mshal 2015-08-28 13:41:26 -07:00
Steffen Wilberg
218d8cfdcb Bug 1195060 - In the Add-ons manager, make Ctrl+f focus the search box again instead of invoking the findbar first. r=mossop 2015-08-24 17:11:17 +02:00
Jonathan Griffin
6f4d57d3e8 Bug 1136892 - Create a browser-chrome-addons tag for running addon-specific browser-chrome tests, r=chmanchester 2015-08-25 09:38:39 -07:00
Dave Townsend
6e0351b0dd Bug 1042699: Block cross-origin add-on install requests. r=dveditz 2015-08-18 17:21:05 -07:00
Dave Townsend
b8b74b14f5 Bug 1193926: Only register chrome for add-ons that need it. r=bsmedberg 2015-08-24 09:36:57 -07:00
Ryan VanderMeulen
a7890c1d6f Merge inbound to m-c. a=merge 2015-08-23 17:18:36 -04:00
Philipp Kewisch
41c7360b69 Bug 1167986 - TEST-UNEXPECTED-FAIL | xpcshell-unpack.ini:toolkit/mozapps/extensions/test/xpcshell/test_signed_install.js (and signing failures) - missing review comments 2015-08-23 12:04:40 +02:00
Philipp Kewisch
9735d51f09 Bug 1167986 - TEST-UNEXPECTED-FAIL | xpcshell-unpack.ini:toolkit/mozapps/extensions/test/xpcshell/test_signed_install.js (and signing failures). r=gps 2015-08-23 11:54:44 +02:00
Robert Helmer
684f836b2b Bug 1196301 - Prefer install.rdf over manifest.json. r=Mossop 2015-08-21 12:30:27 -04:00
Dave Townsend
f551bfb274 Bug 1195034: Only show messages about add-ons being disabled if signing requirements are on. r=dao 2015-08-20 14:25:22 -07:00
Trevor Rowbotham
649313f9ac Bug 1180901 - Catch the error when trying to remove the trash directory when it contains a file that is locked r=mossop 2015-08-20 13:46:48 -07:00
Trevor Rowbotham
4fb33c44bd Bug 1180901 - Test that a locked file cannot be removed from the extensions trash directory on Windows r=mossop 2015-08-20 13:46:29 -07:00
Jonathan Griffin
411013ed53 Bug 1136892 - Create an xpcshell-addons tag for running addon-specific xpcshell tests, r=chmanchester 2015-08-18 11:26:14 -07:00
Phil Ringnalda
44b7668948 Merge f-t to m-c, a=merge 2015-08-09 15:45:11 -07:00
Bill McCloskey
e36327f499 Bug 1189555 - Support moz-extension URIs in addon path service (r=bholley,Mossop) 2015-08-08 18:15:22 -07:00
Dave Townsend
6604cb1468 Bug 1190692: Load web extensions. r=billm
Also corrects a race condition where if an extension was disabled before it
had finished loading its manifest it would have called GlobalManager.init but
never call GlobalManager.uninit.
2015-08-07 15:53:46 -07:00
Dave Townsend
7352eaae32 Bug 1190692: Parse manifest.json files into AddonInternal instances. r=billm 2015-08-07 14:40:08 -07:00
Dave Townsend
d4affb381f Bug 1190692: Split out manifest parsing code to support web extension manifests. r=billm 2015-08-07 13:15:11 -07:00
Dave Townsend
307f5dc9ab Bug 1009332: Present certain internal add-on types as other types through the API. r=billm 2015-08-07 13:13:59 -07:00
Christoph Kerschbaumer
273ce4bbe0 Bug 1180273 - Adding missing 'this' pointer when forwarding newChannel2 calls (r=gijs,sicking) 2015-08-06 11:11:32 -07:00
Carsten "Tomcat" Book
3dfe591c94 Backed out 2 changesets (bug 1191107, bug 1180273) for causing xpcshell and m-oth testfailures on a CLOSED TREEi IGNORE IDL
Backed out changeset c5f710ed8718 (bug 1191107)
Backed out changeset d98d82f9981b (bug 1180273)
2015-08-06 08:39:05 +02:00
Christoph Kerschbaumer
811a9cb829 Bug 1180273 - Adding missing 'this' pointer when forwarding newChannel2 calls (r=gijs,sicking) 2015-08-05 12:55:14 -07:00
Dave Townsend
08ce36ed3a 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
Bill McCloskey
b896cdadec Bug 1175770 - New extension API (r=Mossop) 2015-08-03 10:41:24 -07:00
Carsten "Tomcat" Book
c9902a75bc Backed out changeset 4e3821b236f9 (bug 1175770) 2015-08-03 09:37:54 +02:00
Bill McCloskey
fa560649ba Bug 1175770 - New extension API (r=Mossop) 2015-08-02 17:29:55 -07:00