Closed Bug 1356027 Opened 7 years ago Closed 7 years ago

Add pref that disables loading any extensions without MPC=true

Categories

(Toolkit :: Add-ons Manager, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: aswan, Assigned: aswan)

References

Details

Attachments

(1 file)

      No description provided.
Attachment #8857759 - Flags: review?(dtownsend)
Mossop: full context for this is in bug 1352204.  The test feels a little light to me, if you have ideas about scenarios I may have overlooked, I'd be glad to add more tests.
Mossop pointed out on IRC that appDisabled is stored in extensions.json and not generally recomputed when the browser starts, so without any further changes, when we flip the pref on Nightly this won't take effect for non-MPC extensions that are already installed.  Recomputing requires re-reading extensions.json which is expensive enough that we want to avoid it when it isn't necessary, but changing the schema version causes it to be rebuilt (which recomputes appDisabled).

I verified this manually by doing the following:
1. Install an old version of ghostery that is not marked MPC, it installs successfully.
2. Close the browser, edit profile/prefs.js to set extensions.allow-non-mpc-extensions to false, restart the browser, ghostery is not disabled.
3. Close the browser, increment DB_SCHEMA in XPIProvider.jsm, (clear the startup cache), restart the browser, ghostery is disabled.

So this should be good to go as-is, we'll need to increment DB_SCHEMA when we flip the pref as discussed in bug 1352204.
Comment on attachment 8857759 [details]
Bug 1356027 Add pref to disable non-MPC extensions

https://reviewboard.mozilla.org/r/129732/#review133012

Looks good. A few things we could do to bulk out the test a little:

1. Also test an add-on that is mpc.
2. Test installing when the pref is not set.
3. Flip the pref back to false when the add-on is still installed and make sure it becomes disabled again.
Attachment #8857759 - Flags: review?(dtownsend) → review+
Pushed by aswan@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8987472ddb9f
Add pref to disable non-MPC extensions r=mossop
https://hg.mozilla.org/mozilla-central/rev/8987472ddb9f
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: