Closed Bug 1193973 Opened 7 years ago Closed 7 years ago

The system add-ons that shipped with the app should be loaded in safe mode

Categories

(Toolkit :: Add-ons Manager, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla44
Tracking Status
firefox43 --- affected
firefox44 --- fixed

People

(Reporter: mossop, Assigned: mossop)

References

Details

Attachments

(1 file)

What should we do with system add-ons in safe mode?
Summary: Figure out what to do about system add-ons when in safe mode → The system add-ons that shipped with the app should be loaded in safe mode
Assignee: nobody → dtownsend
Bug 1193973: System add-ons that shipped with the app should be loaded in safe mode. r?rhelmer
Attachment #8665533 - Flags: review?(rhelmer)
Comment on attachment 8665533 [details]
MozReview Request: Bug 1193973: System add-ons that shipped with the app should be loaded in safe mode. r?rhelmer

Actually this isn't quite right yet.
Attachment #8665533 - Flags: review?(rhelmer)
Comment on attachment 8665533 [details]
MozReview Request: Bug 1193973: System add-ons that shipped with the app should be loaded in safe mode. r?rhelmer

Bug 1193973: System add-ons that shipped with the app should be loaded in safe mode. r?rhelmer

By making the updated system add-on install location return an empty set when
in safe mode it causes us to rescan and enable the default system add-ons.

The complication is calling the uninstall method on the updated add-ons when
switching to safe mode, for that we have to cache the fact that an add-on
can run in safe mode in the bootstrappedAddons data so it persists to the
next restart and can be accessed when the updated add-on has been hidden.
Attachment #8665533 - Flags: review?(rhelmer)
Comment on attachment 8665533 [details]
MozReview Request: Bug 1193973: System add-ons that shipped with the app should be loaded in safe mode. r?rhelmer

https://reviewboard.mozilla.org/r/20251/#review18725
Attachment #8665533 - Flags: review?(rhelmer) → review+
Comment on attachment 8665533 [details]
MozReview Request: Bug 1193973: System add-ons that shipped with the app should be loaded in safe mode. r?rhelmer

Bug 1193973: System add-ons that shipped with the app should be loaded in safe mode. r?rhelmer

By making the updated system add-on install location return an empty set when
in safe mode it causes us to rescan and enable the default system add-ons.

The complication is calling the uninstall method on the updated add-ons when
switching to safe mode, for that we have to cache the fact that an add-on
can run in safe mode in the bootstrappedAddons data so it persists to the
next restart and can be accessed when the updated add-on has been hidden.
Comment on attachment 8665533 [details]
MozReview Request: Bug 1193973: System add-ons that shipped with the app should be loaded in safe mode. r?rhelmer

Apparently I didn't run tests on this properly so I had to make some tweaks to fix an issue, see https://reviewboard.mozilla.org/r/20251/diff/2-3/ but you can ignore the bottom two changes listed as they come from rebasing this on top of other stuff that has landed.
Attachment #8665533 - Flags: review+ → review?(rhelmer)
Comment on attachment 8665533 [details]
MozReview Request: Bug 1193973: System add-ons that shipped with the app should be loaded in safe mode. r?rhelmer

https://reviewboard.mozilla.org/r/20251/#review18893

::: toolkit/mozapps/extensions/internal/XPIProvider.jsm:4332
(Diff revisions 2 - 3)
> -    let runInSafeMode = "runInSafeMode" in aAddon ? aAddon.runInSafeMode : canRunInSafeMode(aAddon);
> +    let runInSafeMode = ("runInSafeMode" in aAddon) ? aAddon.runInSafeMode : canRunInSafeMode(aAddon);

why are the parens necesssary?
Attachment #8665533 - Flags: review?(rhelmer) → review+
https://reviewboard.mozilla.org/r/20251/#review18893

> why are the parens necesssary?

Looks like they're not, I can drop that.
https://hg.mozilla.org/mozilla-central/rev/08ae873336b7
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
You need to log in before you can comment on or make changes to this bug.